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

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

Issue 10335015: Treat SyncCredentialsLost as an auth error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 bool status_has_error = sync_ui_util::GetStatusLabels( 1014 bool status_has_error = sync_ui_util::GetStatusLabels(
1015 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == 1015 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) ==
1016 sync_ui_util::SYNC_ERROR; 1016 sync_ui_util::SYNC_ERROR;
1017 sync_status->SetString("statusText", status_label); 1017 sync_status->SetString("statusText", status_label);
1018 sync_status->SetString("actionLinkText", link_label); 1018 sync_status->SetString("actionLinkText", link_label);
1019 sync_status->SetBoolean("hasError", status_has_error); 1019 sync_status->SetBoolean("hasError", status_has_error);
1020 1020
1021 sync_status->SetBoolean("managed", service->IsManaged()); 1021 sync_status->SetBoolean("managed", service->IsManaged());
1022 sync_status->SetBoolean("hasUnrecoverableError", 1022 sync_status->SetBoolean("hasUnrecoverableError",
1023 service->unrecoverable_error_detected()); 1023 service->unrecoverable_error_detected());
1024 sync_status->SetBoolean("autoLoginVisible", 1024 sync_status->SetBoolean(
1025 "autoLoginVisible",
1025 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1026 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1026 service->AreCredentialsAvailable()); 1027 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable());
1027 1028
1028 return sync_status.Pass(); 1029 return sync_status.Pass();
1029 } 1030 }
1030 1031
1031 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1032 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1032 const ListValue* args) { 1033 const ListValue* args) {
1033 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1034 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1034 select_folder_dialog_ = SelectFileDialog::Create(this); 1035 select_folder_dialog_ = SelectFileDialog::Create(this);
1035 select_folder_dialog_->SelectFile( 1036 select_folder_dialog_->SelectFile(
1036 SelectFileDialog::SELECT_FOLDER, 1037 SelectFileDialog::SELECT_FOLDER,
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 } 1410 }
1410 1411
1411 void BrowserOptionsHandler::SetupSSLConfigSettings() { 1412 void BrowserOptionsHandler::SetupSSLConfigSettings() {
1412 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); 1413 base::FundamentalValue checked(rev_checking_enabled_.GetValue());
1413 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); 1414 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged());
1414 web_ui()->CallJavascriptFunction( 1415 web_ui()->CallJavascriptFunction(
1415 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); 1416 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled);
1416 } 1417 }
1417 1418
1418 } // namespace options2 1419 } // 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