summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc')
-rw-r--r--chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc b/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
index f813cb5..03f2f7f 100644
--- a/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
+++ b/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
@@ -7,6 +7,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/user_manager.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chromeos/settings/cros_settings_names.h"
#include "content/public/browser/web_ui_data_source.h"
@@ -14,7 +15,8 @@
namespace chromeos {
void AddAccountUITweaksLocalizedValues(
- base::DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings,
+ Profile* profile) {
DCHECK(localized_strings);
std::string owner_email;
@@ -25,7 +27,7 @@ void AddAccountUITweaksLocalizedValues(
localized_strings->SetString("ownerUserId", display_email);
localized_strings->SetBoolean("currentUserIsOwner",
- UserManager::Get()->IsCurrentUserOwner());
+ ProfileHelper::IsOwnerProfile(profile));
localized_strings->SetBoolean("loggedInAsGuest",
UserManager::Get()->IsLoggedInAsGuest());
@@ -35,10 +37,11 @@ void AddAccountUITweaksLocalizedValues(
}
void AddAccountUITweaksLocalizedValues(
- content::WebUIDataSource* source) {
+ content::WebUIDataSource* source,
+ Profile* profile) {
DCHECK(source);
base::DictionaryValue dict;
- AddAccountUITweaksLocalizedValues(&dict);
+ AddAccountUITweaksLocalizedValues(&dict, profile);
source->AddLocalizedStrings(dict);
}