Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Side by Side Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 10388169: Merge 137359 - Treat SyncCredentialsLost as an auth error (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 bool status_has_error = sync_ui_util::GetStatusLabels( 1020 bool status_has_error = sync_ui_util::GetStatusLabels(
1021 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == 1021 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) ==
1022 sync_ui_util::SYNC_ERROR; 1022 sync_ui_util::SYNC_ERROR;
1023 sync_status->SetString("statusText", status_label); 1023 sync_status->SetString("statusText", status_label);
1024 sync_status->SetString("actionLinkText", link_label); 1024 sync_status->SetString("actionLinkText", link_label);
1025 sync_status->SetBoolean("hasError", status_has_error); 1025 sync_status->SetBoolean("hasError", status_has_error);
1026 1026
1027 sync_status->SetBoolean("managed", service->IsManaged()); 1027 sync_status->SetBoolean("managed", service->IsManaged());
1028 sync_status->SetBoolean("hasUnrecoverableError", 1028 sync_status->SetBoolean("hasUnrecoverableError",
1029 service->unrecoverable_error_detected()); 1029 service->unrecoverable_error_detected());
1030 sync_status->SetBoolean("autoLoginVisible", 1030 sync_status->SetBoolean(
1031 "autoLoginVisible",
1031 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1032 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1032 service->AreCredentialsAvailable()); 1033 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable());
1033 1034
1034 return sync_status.Pass(); 1035 return sync_status.Pass();
1035 } 1036 }
1036 1037
1037 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1038 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1038 const ListValue* args) { 1039 const ListValue* args) {
1039 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1040 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1040 select_folder_dialog_ = SelectFileDialog::Create(this); 1041 select_folder_dialog_ = SelectFileDialog::Create(this);
1041 select_folder_dialog_->SelectFile( 1042 select_folder_dialog_->SelectFile(
1042 SelectFileDialog::SELECT_FOLDER, 1043 SelectFileDialog::SELECT_FOLDER,
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 } 1416 }
1416 1417
1417 void BrowserOptionsHandler::SetupSSLConfigSettings() { 1418 void BrowserOptionsHandler::SetupSSLConfigSettings() {
1418 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); 1419 base::FundamentalValue checked(rev_checking_enabled_.GetValue());
1419 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); 1420 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged());
1420 web_ui()->CallJavascriptFunction( 1421 web_ui()->CallJavascriptFunction(
1421 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); 1422 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled);
1422 } 1423 }
1423 1424
1424 } // namespace options2 1425 } // namespace options2
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698