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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 l10n_util::GetStringUTF16(IDS_SYNC_DATATYPE_TABS)); | 198 l10n_util::GetStringUTF16(IDS_SYNC_DATATYPE_TABS)); |
199 | 199 |
200 #if defined(OS_CHROMEOS) | 200 #if defined(OS_CHROMEOS) |
201 localized_strings->SetString("account", | 201 localized_strings->SetString("account", |
202 l10n_util::GetStringUTF16(IDS_OPTIONS_PERSONAL_ACCOUNT_GROUP_NAME)); | 202 l10n_util::GetStringUTF16(IDS_OPTIONS_PERSONAL_ACCOUNT_GROUP_NAME)); |
203 localized_strings->SetString("enableScreenlock", | 203 localized_strings->SetString("enableScreenlock", |
204 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); | 204 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); |
205 localized_strings->SetString("changePicture", | 205 localized_strings->SetString("changePicture", |
206 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE)); | 206 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE)); |
207 if (chromeos::UserManager::Get()->user_is_logged_in()) { | 207 if (chromeos::UserManager::Get()->user_is_logged_in()) { |
208 localized_strings->SetString("userEmail", | 208 localized_strings->SetString("username", |
209 chromeos::UserManager::Get()->logged_in_user().email()); | 209 chromeos::UserManager::Get()->logged_in_user().email()); |
210 } | 210 } |
211 #endif | 211 #endif |
212 } | 212 } |
213 | 213 |
214 void PersonalOptionsHandler::RegisterMessages() { | 214 void PersonalOptionsHandler::RegisterMessages() { |
215 DCHECK(web_ui_); | 215 DCHECK(web_ui_); |
216 web_ui_->RegisterMessageCallback( | 216 web_ui_->RegisterMessageCallback( |
217 "themesReset", | 217 "themesReset", |
218 base::Bind(&PersonalOptionsHandler::ThemesReset, | 218 base::Bind(&PersonalOptionsHandler::ThemesReset, |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 profile_info_list.Append(profile_value); | 433 profile_info_list.Append(profile_value); |
434 } | 434 } |
435 | 435 |
436 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", | 436 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", |
437 profile_info_list); | 437 profile_info_list); |
438 } | 438 } |
439 | 439 |
440 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { | 440 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { |
441 ProfileManager::CreateMultiProfileAsync(); | 441 ProfileManager::CreateMultiProfileAsync(); |
442 } | 442 } |
OLD | NEW |