OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |