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

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

Issue 8613001: Revert 110905 - Adding parameter to GetStatusLabels to indicate if links are acceptable, as some ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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_unittest.cc ('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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 void PersonalOptionsHandler::OnStateChanged() { 246 void PersonalOptionsHandler::OnStateChanged() {
247 string16 status_label; 247 string16 status_label;
248 string16 link_label; 248 string16 link_label;
249 ProfileSyncService* service = 249 ProfileSyncService* service =
250 Profile::FromWebUI(web_ui_)->GetProfileSyncService(); 250 Profile::FromWebUI(web_ui_)->GetProfileSyncService();
251 DCHECK(service); 251 DCHECK(service);
252 bool managed = service->IsManaged(); 252 bool managed = service->IsManaged();
253 bool sync_setup_completed = service->HasSyncSetupCompleted(); 253 bool sync_setup_completed = service->HasSyncSetupCompleted();
254 bool status_has_error = sync_ui_util::GetStatusLabels( 254 bool status_has_error = sync_ui_util::GetStatusLabels(
255 service, sync_ui_util::WITH_HTML, &status_label, &link_label) == 255 service, &status_label, &link_label) == sync_ui_util::SYNC_ERROR;
256 sync_ui_util::SYNC_ERROR;
257 256
258 string16 start_stop_button_label; 257 string16 start_stop_button_label;
259 bool is_start_stop_button_visible = false; 258 bool is_start_stop_button_visible = false;
260 bool is_start_stop_button_enabled = false; 259 bool is_start_stop_button_enabled = false;
261 if (sync_setup_completed) { 260 if (sync_setup_completed) {
262 start_stop_button_label = 261 start_stop_button_label =
263 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); 262 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL);
264 #if defined(OS_CHROMEOS) 263 #if defined(OS_CHROMEOS)
265 is_start_stop_button_visible = false; 264 is_start_stop_button_visible = false;
266 #else 265 #else
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 profile_info_list.Append(profile_value); 417 profile_info_list.Append(profile_value);
419 } 418 }
420 419
421 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 420 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
422 profile_info_list); 421 profile_info_list);
423 } 422 }
424 423
425 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 424 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
426 ProfileManager::CreateMultiProfileAsync(); 425 ProfileManager::CreateMultiProfileAsync();
427 } 426 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698