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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/options/personal_options.js ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/personal_options_handler.h" 5 #include "chrome/browser/ui/webui/options/personal_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 *label); 302 *label);
303 303
304 enabled.reset(Value::CreateBooleanValue(!managed)); 304 enabled.reset(Value::CreateBooleanValue(!managed));
305 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncActionLinkEnabled", 305 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncActionLinkEnabled",
306 *enabled); 306 *enabled);
307 307
308 visible.reset(Value::CreateBooleanValue(status_has_error)); 308 visible.reset(Value::CreateBooleanValue(status_has_error));
309 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncStatusErrorVisible", 309 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncStatusErrorVisible",
310 *visible); 310 *visible);
311 311
312 enabled.reset(Value::CreateBooleanValue(
313 !service->unrecoverable_error_detected()));
314 web_ui_->CallJavascriptFunction(
315 "PersonalOptions.setCustomizeSyncButtonEnabled",
316 *enabled);
317
312 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin)) { 318 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin)) {
313 visible.reset(Value::CreateBooleanValue( 319 visible.reset(Value::CreateBooleanValue(
314 service->AreCredentialsAvailable())); 320 service->AreCredentialsAvailable()));
315 web_ui_->CallJavascriptFunction("PersonalOptions.setAutoLoginVisible", 321 web_ui_->CallJavascriptFunction("PersonalOptions.setAutoLoginVisible",
316 *visible); 322 *visible);
317 } 323 }
318 324
319 // Set profile creation text and button if multi-profiles switch is on. 325 // Set profile creation text and button if multi-profiles switch is on.
320 visible.reset(Value::CreateBooleanValue(multiprofile_)); 326 visible.reset(Value::CreateBooleanValue(multiprofile_));
321 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesSectionVisible", 327 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesSectionVisible",
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 profile_info_list.Append(profile_value); 414 profile_info_list.Append(profile_value);
409 } 415 }
410 416
411 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 417 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
412 profile_info_list); 418 profile_info_list);
413 } 419 }
414 420
415 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 421 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
416 ProfileManager::CreateMultiProfileAsync(); 422 ProfileManager::CreateMultiProfileAsync();
417 } 423 }
OLDNEW
« 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