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

Unified Diff: chrome/browser/chromeos/profiles/profile_helper.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
Index: chrome/browser/chromeos/profiles/profile_helper.cc
diff --git a/chrome/browser/chromeos/profiles/profile_helper.cc b/chrome/browser/chromeos/profiles/profile_helper.cc
index bf64b12836d417a571344fc577ad120401a527a5..71f751a4ce08ef72771e6a39a8690d0e109a2a4e 100644
--- a/chrome/browser/chromeos/profiles/profile_helper.cc
+++ b/chrome/browser/chromeos/profiles/profile_helper.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browsing_data/browsing_data_helper.h"
#include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h"
+#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -115,6 +116,13 @@ bool ProfileHelper::IsSigninProfile(Profile* profile) {
return profile->GetPath().BaseName().value() == chrome::kInitialProfile;
}
+// static
+bool ProfileHelper::IsOwnerProfile(Profile* profile) {
+ chromeos::UserManager* manager = chromeos::UserManager::Get();
+ chromeos::User* user = manager->GetUserByProfile(profile);
+ return user->email() == manager->GetOwnerEmail();
+}
+
void ProfileHelper::ProfileStartup(Profile* profile, bool process_startup) {
// Initialize Chrome OS preferences like touch pad sensitivity. For the
// preferences to work in the guest mode, the initialization has to be
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.h ('k') | chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698