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

Unified Diff: chrome/browser/chromeos/profiles/profile_helper.cc

Issue 442833002: Disallow Easy Unlock in secondary user profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 658a1075f0b8f71c6e2bd0012104dab0c42fcf9c..155084ef1dd5f58c9bb98c48c47e59a3adc97c51 100644
--- a/chrome/browser/chromeos/profiles/profile_helper.cc
+++ b/chrome/browser/chromeos/profiles/profile_helper.cc
@@ -177,6 +177,16 @@ bool ProfileHelper::IsOwnerProfile(Profile* profile) {
return user->email() == chromeos::UserManager::Get()->GetOwnerEmail();
}
+//static
+bool ProfileHelper::IsPrimaryProfile(Profile* profile) {
+ if (!profile)
+ return false;
+ user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile);
+ if (!user)
+ return false;
+ return user == chromeos::UserManager::Get()->GetPrimaryUser();
+}
+
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

Powered by Google App Engine
This is Rietveld 408576698