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())); |