Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7903)

Unified Diff: chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc

Issue 144983002: Fixed chrome://settings/accounts availability for MP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed proxy_settings_ui. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/ui_account_tweaks.h ('k') | chrome/browser/ui/webui/components_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..03f2f7fa7a628580d92227049afb0d8fe540e19a 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);
}
« no previous file with comments | « chrome/browser/ui/webui/chromeos/ui_account_tweaks.h ('k') | chrome/browser/ui/webui/components_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698