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

Unified Diff: chrome/browser/ui/webui/options/personal_options_handler.cc

Issue 8332019: [Sync UI] Disable the "Advanced..." button when there is an unrecoverable sync error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/options/personal_options.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/personal_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/personal_options_handler.cc b/chrome/browser/ui/webui/options/personal_options_handler.cc
index acc3da77aed09d28fff24dbe2435129e763d00b2..6fdd787ed07cb628cf3a3c1cf4c5e6c9e3175164 100644
--- a/chrome/browser/ui/webui/options/personal_options_handler.cc
+++ b/chrome/browser/ui/webui/options/personal_options_handler.cc
@@ -250,6 +250,7 @@ void PersonalOptionsHandler::OnStateChanged() {
bool sync_setup_completed = service->HasSyncSetupCompleted();
bool status_has_error = sync_ui_util::GetStatusLabels(
service, &status_label, &link_label) == sync_ui_util::SYNC_ERROR;
+ bool has_unrecoverable_error = service->unrecoverable_error_detected();
James Hawkins 2011/10/25 17:50:41 No need for temp var.
binji 2011/10/25 18:14:33 Done.
string16 start_stop_button_label;
bool is_start_stop_button_visible = false;
@@ -309,6 +310,11 @@ void PersonalOptionsHandler::OnStateChanged() {
web_ui_->CallJavascriptFunction("PersonalOptions.setSyncStatusErrorVisible",
*visible);
+ enabled.reset(Value::CreateBooleanValue(!has_unrecoverable_error));
+ web_ui_->CallJavascriptFunction(
+ "PersonalOptions.setCustomizeSyncButtonEnabled",
+ *enabled);
+
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin)) {
visible.reset(Value::CreateBooleanValue(
service->AreCredentialsAvailable()));
« no previous file with comments | « chrome/browser/resources/options/personal_options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698