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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 void PersonalOptionsHandler::OnStateChanged() { | 241 void PersonalOptionsHandler::OnStateChanged() { |
242 string16 status_label; | 242 string16 status_label; |
243 string16 link_label; | 243 string16 link_label; |
244 ProfileSyncService* service = | 244 ProfileSyncService* service = |
245 Profile::FromWebUI(web_ui_)->GetProfileSyncService(); | 245 Profile::FromWebUI(web_ui_)->GetProfileSyncService(); |
246 DCHECK(service); | 246 DCHECK(service); |
247 bool managed = service->IsManaged(); | 247 bool managed = service->IsManaged(); |
248 bool sync_setup_completed = service->HasSyncSetupCompleted(); | 248 bool sync_setup_completed = service->HasSyncSetupCompleted(); |
249 bool status_has_error = sync_ui_util::GetStatusLabels( | 249 bool status_has_error = sync_ui_util::GetStatusLabels( |
250 service, &status_label, &link_label) == sync_ui_util::SYNC_ERROR; | 250 service, sync_ui_util::WITH_HTML, &status_label, &link_label) == |
| 251 sync_ui_util::SYNC_ERROR; |
251 | 252 |
252 string16 start_stop_button_label; | 253 string16 start_stop_button_label; |
253 bool is_start_stop_button_visible = false; | 254 bool is_start_stop_button_visible = false; |
254 bool is_start_stop_button_enabled = false; | 255 bool is_start_stop_button_enabled = false; |
255 if (sync_setup_completed) { | 256 if (sync_setup_completed) { |
256 start_stop_button_label = | 257 start_stop_button_label = |
257 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); | 258 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); |
258 #if defined(OS_CHROMEOS) | 259 #if defined(OS_CHROMEOS) |
259 is_start_stop_button_visible = false; | 260 is_start_stop_button_visible = false; |
260 #else | 261 #else |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 profile_info_list.Append(profile_value); | 413 profile_info_list.Append(profile_value); |
413 } | 414 } |
414 | 415 |
415 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", | 416 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", |
416 profile_info_list); | 417 profile_info_list); |
417 } | 418 } |
418 | 419 |
419 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { | 420 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { |
420 ProfileManager::CreateMultiProfileAsync(); | 421 ProfileManager::CreateMultiProfileAsync(); |
421 } | 422 } |
OLD | NEW |