OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/ui_account_tweaks.h" | 5 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
10 #include "chrome/browser/chromeos/settings/cros_settings.h" | 10 #include "chrome/browser/chromeos/settings/cros_settings.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // Translate owner's email to the display email. | 22 // Translate owner's email to the display email. |
23 std::string display_email = | 23 std::string display_email = |
24 UserManager::Get()->GetUserDisplayEmail(owner_email); | 24 UserManager::Get()->GetUserDisplayEmail(owner_email); |
25 localized_strings->SetString("ownerUserId", display_email); | 25 localized_strings->SetString("ownerUserId", display_email); |
26 | 26 |
27 localized_strings->SetBoolean("currentUserIsOwner", | 27 localized_strings->SetBoolean("currentUserIsOwner", |
28 UserManager::Get()->IsCurrentUserOwner()); | 28 UserManager::Get()->IsCurrentUserOwner()); |
29 | 29 |
30 localized_strings->SetBoolean("loggedInAsGuest", | 30 localized_strings->SetBoolean("loggedInAsGuest", |
31 UserManager::Get()->IsLoggedInAsGuest()); | 31 UserManager::Get()->IsLoggedInAsGuest()); |
| 32 |
| 33 localized_strings->SetBoolean("loggedInAsLocallyManagedUser", |
| 34 UserManager::Get()->IsLoggedInAsLocallyManagedUser()); |
32 } | 35 } |
33 | 36 |
34 void AddAccountUITweaksLocalizedValues( | 37 void AddAccountUITweaksLocalizedValues( |
35 content::WebUIDataSource* source) { | 38 content::WebUIDataSource* source) { |
36 DCHECK(source); | 39 DCHECK(source); |
37 DictionaryValue dict; | 40 DictionaryValue dict; |
38 AddAccountUITweaksLocalizedValues(&dict); | 41 AddAccountUITweaksLocalizedValues(&dict); |
39 source->AddLocalizedStrings(dict); | 42 source->AddLocalizedStrings(dict); |
40 } | 43 } |
41 | 44 |
42 } // namespace chromeos | 45 } // namespace chromeos |
OLD | NEW |