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

Unified Diff: chrome/browser/profiles/profiles_state.cc

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit tests Created 6 years, 3 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/profiles/profiles_state.cc
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
index 068ddff1a6900fd5b2c3545adc939ed8c9e61c54..5922ca87a7745bdeac626492dbf0c5111e0ed061 100644
--- a/chrome/browser/profiles/profiles_state.cc
+++ b/chrome/browser/profiles/profiles_state.cc
@@ -138,9 +138,24 @@ bool IsRegularOrGuestSession(Browser* browser) {
return profile->IsGuestSession() || !profile->IsOffTheRecord();
}
-void UpdateGaiaProfilePhotoIfNeeded(Profile* profile) {
+void UpdateIsProfileLockEnabledIfNeeded(Profile* profile) {
+ DCHECK(switches::IsNewProfileManagement());
+ DCHECK(switches::IsGoogleProfileInfo());
noms (inactive) 2014/09/15 18:52:40 Maybe you should remove the IsGoogleProfileInfo DC
Mike Lerman 2014/09/15 19:51:41 Done.
+ DCHECK(profile);
+
+ PrefService* pref_service = profile->GetPrefs();
+ int lock_status_version =
+ pref_service->GetInteger(prefs::kProfileIsLockableVersion);
+ if (lock_status_version == profiles::kCurrentLockAlgorithmVersion)
+ return;
+
+ GAIAInfoUpdateServiceFactory::GetInstance()->GetForProfile(profile)->Update();
+}
+
+void UpdateGaiaProfileInfoIfNeeded(Profile* profile) {
// If the --google-profile-info flag isn't used, then the
- // GAIAInfoUpdateService isn't initialized, and we can't download the picture.
+ // GAIAInfoUpdateService isn't initialized, and we can't download the profile
+ // info.
if (!switches::IsGoogleProfileInfo())
return;

Powered by Google App Engine
This is Rietveld 408576698