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

Unified Diff: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc

Issue 271063002: Reintroduce proper checking for owner profile for the UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/options/chromeos/accounts_options_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
index 5771c5e3bf5dfa8325c8bfa8c1948e8fef5b4e2c..6524a25a5d3b15e923730db9e608fb7dc1efbaab 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -182,9 +182,7 @@ base::Value* CoreChromeOSOptionsHandler::FetchPref(
g_browser_process->platform_part()->browser_policy_connector_chromeos();
if (connector->IsEnterpriseManaged())
controlled_by = "policy";
- // TODO(pastarmovj): Replace this call with a multi-profile aware one.
- // see http://crbug.com/362430
- else if (!UserManager::Get()->IsCurrentUserOwner())
+ else if (!ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())))
controlled_by = "owner";
}
dict->SetBoolean("disabled", !controlled_by.empty());
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698