Chromium Code Reviews| 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..bb521d3c29661f559e1f00b31cf720c71c0366cf 100644 |
| --- a/chrome/browser/profiles/profiles_state.cc |
| +++ b/chrome/browser/profiles/profiles_state.cc |
| @@ -138,7 +138,23 @@ bool IsRegularOrGuestSession(Browser* browser) { |
| return profile->IsGuestSession() || !profile->IsOffTheRecord(); |
| } |
| -void UpdateGaiaProfilePhotoIfNeeded(Profile* profile) { |
| +void UpdateIsProfileLockEnabledIfNeeded(Profile* profile) { |
| + if (!switches::IsNewProfileManagement()) |
| + return; |
|
noms (inactive)
2014/09/12 19:33:25
Maybe you can just DCHECK that IsNewProfileManagem
Mike Lerman
2014/09/15 14:08:55
fo sho
|
| + |
| + DCHECK(switches::IsGoogleProfileInfo()); |
| + 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 |
|
noms (inactive)
2014/09/12 19:33:25
Since you've renamed the function, please update t
Mike Lerman
2014/09/15 14:08:56
Done.
|
| // GAIAInfoUpdateService isn't initialized, and we can't download the picture. |
| if (!switches::IsGoogleProfileInfo()) |