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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
195 localized_strings->SetString("syncsessions", | 195 localized_strings->SetString("syncsessions", |
196 l10n_util::GetStringUTF16(IDS_SYNC_DATATYPE_TABS)); | 196 l10n_util::GetStringUTF16(IDS_SYNC_DATATYPE_TABS)); |
197 | 197 |
198 #if defined(OS_CHROMEOS) | 198 #if defined(OS_CHROMEOS) |
199 localized_strings->SetString("account", | 199 localized_strings->SetString("account", |
200 l10n_util::GetStringUTF16(IDS_OPTIONS_PERSONAL_ACCOUNT_GROUP_NAME)); | 200 l10n_util::GetStringUTF16(IDS_OPTIONS_PERSONAL_ACCOUNT_GROUP_NAME)); |
201 localized_strings->SetString("enableScreenlock", | 201 localized_strings->SetString("enableScreenlock", |
202 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); | 202 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); |
203 localized_strings->SetString("changePicture", | 203 localized_strings->SetString("changePicture", |
204 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE)); | 204 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE)); |
205 localized_strings->SetString("userEmail", | 205 if (chromeos::UserManager::Get()->user_is_logged_in()) |
zel
2011/11/21 23:04:18
{} missing
| |
206 chromeos::UserManager::Get()->logged_in_user().email()); | 206 localized_strings->SetString("userEmail", |
207 chromeos::UserManager::Get()->logged_in_user().email()); | |
207 #endif | 208 #endif |
208 } | 209 } |
209 | 210 |
210 void PersonalOptionsHandler::RegisterMessages() { | 211 void PersonalOptionsHandler::RegisterMessages() { |
211 DCHECK(web_ui_); | 212 DCHECK(web_ui_); |
212 web_ui_->RegisterMessageCallback( | 213 web_ui_->RegisterMessageCallback( |
213 "themesReset", | 214 "themesReset", |
214 base::Bind(&PersonalOptionsHandler::ThemesReset, | 215 base::Bind(&PersonalOptionsHandler::ThemesReset, |
215 base::Unretained(this))); | 216 base::Unretained(this))); |
216 #if defined(TOOLKIT_GTK) | 217 #if defined(TOOLKIT_GTK) |
(...skipping 200 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 |