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

Unified Diff: chrome/browser/profiles/profile_attributes_entry.h

Issue 2478173003: Lock profile before sign in when force sign in is enabled. (Closed)
Patch Set: fixup Created 4 years, 1 month 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/profiles/profile_attributes_entry.h
diff --git a/chrome/browser/profiles/profile_attributes_entry.h b/chrome/browser/profiles/profile_attributes_entry.h
index dbe978290f50e9e69e4e78cdf0acb87aa980eef8..19e2380ba81cda8a5de98a107dd020716263d0a1 100644
--- a/chrome/browser/profiles/profile_attributes_entry.h
+++ b/chrome/browser/profiles/profile_attributes_entry.h
@@ -124,6 +124,9 @@ class ProfileAttributesEntry {
void SetAuthInfo(const std::string& gaia_id, const base::string16& user_name);
+ // Lock/Unlock the profile, should be called only if force-sign-in is enabled.
+ void LockForceSigninProfile(bool is_lock);
+
private:
// These members are an implementation detail meant to smooth the migration
// of the ProfileInfoCache to the ProfileAttributesStorage interface. They can
@@ -137,6 +140,12 @@ class ProfileAttributesEntry {
ProfileInfoCache* profile_info_cache_;
base::FilePath profile_path_;
+ // A separate boolean flag indicates whether the signin is required when force
+ // signin is enabled. So that the profile locked status will be stored in
+ // memory only and can be easily reset once the policy is turned off.
+ bool is_force_signin_profile_locked_ = false;
+ bool is_force_signin_enabled_;
anthonyvd 2016/11/04 21:31:02 Why store this instead of just checking the pref?
zmin 2016/11/04 22:11:53 The value of force sign in policy won't be changed
+
DISALLOW_COPY_AND_ASSIGN(ProfileAttributesEntry);
};

Powered by Google App Engine
This is Rietveld 408576698