| Index: chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
|
| diff --git a/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc b/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
|
| index f813cb51a5f76baabc3c97d0a817d8e00f6b4d0b..fe801f87bbf3774ea52a356f824418037f8de945 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::IsProfileOwner(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);
|
| }
|
|
|
|
|