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

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

Issue 8383036: Adding parameter to GetStatusLabels to indicate if links are acceptable. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Further test fixes. 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 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, &status_label, &link_label) == sync_ui_util::SYNC_ERROR; 255 service, sync_ui_util::WITH_HTML, &status_label, &link_label) ==
256 sync_ui_util::SYNC_ERROR;
256 257
257 string16 start_stop_button_label; 258 string16 start_stop_button_label;
258 bool is_start_stop_button_visible = false; 259 bool is_start_stop_button_visible = false;
259 bool is_start_stop_button_enabled = false; 260 bool is_start_stop_button_enabled = false;
260 if (sync_setup_completed) { 261 if (sync_setup_completed) {
261 start_stop_button_label = 262 start_stop_button_label =
262 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); 263 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL);
263 #if defined(OS_CHROMEOS) 264 #if defined(OS_CHROMEOS)
264 is_start_stop_button_visible = false; 265 is_start_stop_button_visible = false;
265 #else 266 #else
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 profile_info_list.Append(profile_value); 418 profile_info_list.Append(profile_value);
418 } 419 }
419 420
420 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 421 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
421 profile_info_list); 422 profile_info_list);
422 } 423 }
423 424
424 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 425 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
425 ProfileManager::CreateMultiProfileAsync(); 426 ProfileManager::CreateMultiProfileAsync();
426 } 427 }
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