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

Side by Side Diff: chrome/browser/ui/webui/options/personal_options_handler.cc

Issue 8395026: Merge 107203 - [Sync UI] Disable the "Advanced..." button when there is an unrecoverable sync error. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 *label); 299 *label);
300 300
301 enabled.reset(Value::CreateBooleanValue(!managed)); 301 enabled.reset(Value::CreateBooleanValue(!managed));
302 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncActionLinkEnabled", 302 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncActionLinkEnabled",
303 *enabled); 303 *enabled);
304 304
305 visible.reset(Value::CreateBooleanValue(status_has_error)); 305 visible.reset(Value::CreateBooleanValue(status_has_error));
306 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncStatusErrorVisible", 306 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncStatusErrorVisible",
307 *visible); 307 *visible);
308 308
309 enabled.reset(Value::CreateBooleanValue(
310 !service->unrecoverable_error_detected()));
311 web_ui_->CallJavascriptFunction(
312 "PersonalOptions.setCustomizeSyncButtonEnabled",
313 *enabled);
314
309 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin)) { 315 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin)) {
310 visible.reset(Value::CreateBooleanValue( 316 visible.reset(Value::CreateBooleanValue(
311 service->AreCredentialsAvailable())); 317 service->AreCredentialsAvailable()));
312 web_ui_->CallJavascriptFunction("PersonalOptions.setAutoLoginVisible", 318 web_ui_->CallJavascriptFunction("PersonalOptions.setAutoLoginVisible",
313 *visible); 319 *visible);
314 } 320 }
315 321
316 // Set profile creation text and button if multi-profiles switch is on. 322 // Set profile creation text and button if multi-profiles switch is on.
317 visible.reset(Value::CreateBooleanValue(multiprofile_)); 323 visible.reset(Value::CreateBooleanValue(multiprofile_));
318 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesSectionVisible", 324 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesSectionVisible",
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 profile_info_list.Append(profile_value); 411 profile_info_list.Append(profile_value);
406 } 412 }
407 413
408 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 414 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
409 profile_info_list); 415 profile_info_list);
410 } 416 }
411 417
412 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 418 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
413 ProfileManager::CreateMultiProfileAsync(); 419 ProfileManager::CreateMultiProfileAsync();
414 } 420 }
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