Chromium Code Reviews| Index: chrome/browser/profiles/gaia_info_update_service.cc |
| diff --git a/chrome/browser/profiles/gaia_info_update_service.cc b/chrome/browser/profiles/gaia_info_update_service.cc |
| index d370a759c8a14305559845ada98428f45a2483a4..b6ec612fe313336f7fb7117b2148094db80ff3ca 100644 |
| --- a/chrome/browser/profiles/gaia_info_update_service.cc |
| +++ b/chrome/browser/profiles/gaia_info_update_service.cc |
| @@ -5,11 +5,13 @@ |
| #include "chrome/browser/profiles/gaia_info_update_service.h" |
| #include "base/prefs/pref_service.h" |
| +#include "base/strings/utf_string_conversions.h" |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/profiles/profile_info_cache.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| +#include "chrome/browser/profiles/profiles_state.h" |
| #include "chrome/browser/signin/signin_manager_factory.h" |
| #include "chrome/browser/sync/profile_sync_service.h" |
| #include "chrome/common/pref_names.h" |
| @@ -135,6 +137,14 @@ void GAIAInfoUpdateService::OnProfileDownloadSuccess( |
| } else if (picture_status == ProfileDownloader::PICTURE_DEFAULT) { |
| cache.SetGAIAPictureOfProfileAtIndex(profile_index, NULL); |
| } |
| + |
| + const base::string16& hosted_domain = downloader->GetProfileHostedDomain(); |
|
noms (inactive)
2014/09/15 20:24:39
Oh, you don't need the &. Just const base::string1
Mike Lerman
2014/09/15 20:41:09
Done.
|
| + profile_->GetPrefs()->SetInteger(prefs::kProfileIsLockableVersion, |
| + profiles::kCurrentLockAlgorithmVersion); |
| + // Google.com is never SAML, so can safely be offered lock. |
| + profile_->GetPrefs()->SetBoolean(prefs::kProfileIsLockable, |
| + hosted_domain.empty() || |
| + (hosted_domain == base::UTF8ToUTF16("google.com"))); |
| } |
| void GAIAInfoUpdateService::OnProfileDownloadFailure( |