Chromium Code Reviews| 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, &status_label, &link_label, true) == sync_ui_util::SYNC_ERROR; |
|
akalin
2011/10/28 19:10:22
what about "true /* has_links */"
jimblackler
2011/11/01 16:15:30
Done.
| |
| 251 | 251 |
| 252 string16 start_stop_button_label; | 252 string16 start_stop_button_label; |
| 253 bool is_start_stop_button_visible = false; | 253 bool is_start_stop_button_visible = false; |
| 254 bool is_start_stop_button_enabled = false; | 254 bool is_start_stop_button_enabled = false; |
| 255 if (sync_setup_completed) { | 255 if (sync_setup_completed) { |
| 256 start_stop_button_label = | 256 start_stop_button_label = |
| 257 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); | 257 l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); |
| 258 #if defined(OS_CHROMEOS) | 258 #if defined(OS_CHROMEOS) |
| 259 is_start_stop_button_visible = false; | 259 is_start_stop_button_visible = false; |
| 260 #else | 260 #else |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 profile_info_list.Append(profile_value); | 412 profile_info_list.Append(profile_value); |
| 413 } | 413 } |
| 414 | 414 |
| 415 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", | 415 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", |
| 416 profile_info_list); | 416 profile_info_list); |
| 417 } | 417 } |
| 418 | 418 |
| 419 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { | 419 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { |
| 420 ProfileManager::CreateMultiProfileAsync(); | 420 ProfileManager::CreateMultiProfileAsync(); |
| 421 } | 421 } |
| OLD | NEW |