Index: chrome/browser/profiles/profiles_state.cc |
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc |
index 2735fc6ba4303d110fb18c9d3945d21ae6903d8a..5c674efe0858ded70c956d8535441f72f3b41e69 100644 |
--- a/chrome/browser/profiles/profiles_state.cc |
+++ b/chrome/browser/profiles/profiles_state.cc |
@@ -256,4 +256,24 @@ void SetLastUsedProfile(const std::string& profile_dir) { |
local_state->SetString(prefs::kProfileLastUsed, profile_dir); |
} |
+bool AreAllProfilesLocked() { |
+ bool all_profiles_locked = true; |
+ |
+ std::vector<ProfileAttributesEntry*> entries = |
+ g_browser_process->profile_manager()->GetProfileAttributesStorage(). |
+ GetAllProfilesAttributes(); |
+ for (const ProfileAttributesEntry* entry : entries) { |
+ if (entry->IsOmitted()) |
+ continue; |
+ |
+ if (!entry->IsSigninRequired() && |
dpapad
2016/05/27 23:59:42
Can we hide the complexity of determining whether
anthonyvd
2016/05/30 14:09:28
Semantically, that's what IsSigninRequired is doin
|
+ !entry->IsChild() && |
+ !entry->IsLegacySupervised()) { |
+ all_profiles_locked = false; |
+ break; |
+ } |
+ } |
+ return all_profiles_locked; |
+} |
+ |
} // namespace profiles |