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

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

Issue 8634008: Adding parameter to GetStatusLabels to indicate if links are acceptable. (Re applied) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Test fix. 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
« 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 void PersonalOptionsHandler::OnStateChanged() { 248 void PersonalOptionsHandler::OnStateChanged() {
249 string16 status_label; 249 string16 status_label;
250 string16 link_label; 250 string16 link_label;
251 ProfileSyncService* service = 251 ProfileSyncService* service =
252 Profile::FromWebUI(web_ui_)->GetProfileSyncService(); 252 Profile::FromWebUI(web_ui_)->GetProfileSyncService();
253 DCHECK(service); 253 DCHECK(service);
254 bool managed = service->IsManaged(); 254 bool managed = service->IsManaged();
255 bool sync_setup_completed = service->HasSyncSetupCompleted(); 255 bool sync_setup_completed = service->HasSyncSetupCompleted();
256 bool status_has_error = sync_ui_util::GetStatusLabels( 256 bool status_has_error = sync_ui_util::GetStatusLabels(
257 service, &status_label, &link_label) == sync_ui_util::SYNC_ERROR; 257 service, sync_ui_util::WITH_HTML, &status_label, &link_label) ==
258 sync_ui_util::SYNC_ERROR;
258 259
259 string16 start_stop_button_label; 260 string16 start_stop_button_label;
260 bool is_start_stop_button_visible = false; 261 bool is_start_stop_button_visible = false;
261 bool is_start_stop_button_enabled = false; 262 bool is_start_stop_button_enabled = false;
262 if (sync_setup_completed) { 263 if (sync_setup_completed) {
263 start_stop_button_label = 264 start_stop_button_label =
264 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); 265 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL);
265 #if defined(OS_CHROMEOS) 266 #if defined(OS_CHROMEOS)
266 is_start_stop_button_visible = false; 267 is_start_stop_button_visible = false;
267 #else 268 #else
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 profile_info_list.Append(profile_value); 420 profile_info_list.Append(profile_value);
420 } 421 }
421 422
422 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 423 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
423 profile_info_list); 424 profile_info_list);
424 } 425 }
425 426
426 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 427 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
427 ProfileManager::CreateMultiProfileAsync(); 428 ProfileManager::CreateMultiProfileAsync();
428 } 429 }
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