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

Unified Diff: chrome/browser/signin/easy_unlock_service.cc

Issue 442833002: Disallow Easy Unlock in secondary user profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove static 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/signin/easy_unlock_service.cc
diff --git a/chrome/browser/signin/easy_unlock_service.cc b/chrome/browser/signin/easy_unlock_service.cc
index 59da516f646954231a3ad197df1d8e92c1e1bf4e..1afcbc9e128e45c78b357f083d75025b091eac08 100644
--- a/chrome/browser/signin/easy_unlock_service.cc
+++ b/chrome/browser/signin/easy_unlock_service.cc
@@ -24,6 +24,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/login/users/user_manager.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#endif
namespace {
@@ -90,6 +91,9 @@ bool EasyUnlockService::IsAllowed() {
if (chromeos::UserManager::Get()->IsLoggedInAsGuest())
return false;
+ if (!chromeos::ProfileHelper::IsPrimaryProfile(profile_))
+ return false;
+
if (!profile_->GetPrefs()->GetBoolean(prefs::kEasyUnlockAllowed))
return false;
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/signin/easy_unlock_service_browsertest_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698