Index: chrome/browser/profiles/profile_window.cc |
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc |
index 8567442161b6cfe068d46456cf5cbd7328f845e3..8c9d32632aeb92f0deb5773bac902e2457796daa 100644 |
--- a/chrome/browser/profiles/profile_window.cc |
+++ b/chrome/browser/profiles/profile_window.cc |
@@ -291,6 +291,15 @@ void LockProfile(Profile* profile) { |
} |
} |
+bool IsLockAvailable(Profile* profile) { |
+ DCHECK(profile); |
+ const std::string& hosted_domain = profile->GetPrefs()-> |
+ GetString(prefs::kGoogleServicesHostedDomain); |
+ return switches::IsNewProfileManagement() && |
+ (hosted_domain == Profile::kNoHostedDomainFound || |
+ hosted_domain == "google.com"); |
+} |
+ |
void CreateGuestProfileForUserManager( |
const base::FilePath& profile_path_to_focus, |
profiles::UserManagerTutorialMode tutorial_mode, |