Index: chrome/browser/profiles/profiles_state.cc |
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc |
index 3cfa03ca464408ba6dd74ad84cc9d0210f1580ad..29608ee6a27e35e88df3ecd790fe7438a253df7f 100644 |
--- a/chrome/browser/profiles/profiles_state.cc |
+++ b/chrome/browser/profiles/profiles_state.cc |
@@ -257,7 +257,7 @@ void SetLastUsedProfile(const std::string& profile_dir) { |
} |
bool AreAllProfilesLocked() { |
- bool all_profiles_locked = true; |
+ bool at_least_one_regular_profile_present = false; |
std::vector<ProfileAttributesEntry*> entries = |
g_browser_process->profile_manager()->GetProfileAttributesStorage(). |
@@ -266,14 +266,15 @@ bool AreAllProfilesLocked() { |
if (entry->IsOmitted()) |
continue; |
- // Supervised and Child profiles cannot be locked. |
- if (!entry->IsSigninRequired() && |
- !entry->IsChild() && |
- !entry->IsLegacySupervised()) { |
- return false; |
+ // Only consider non-child and non-supervised profiles. |
+ if (!entry->IsChild() && !entry->IsLegacySupervised()) { |
+ at_least_one_regular_profile_present = true; |
+ |
+ if (!entry->IsSigninRequired()) |
+ return false; |
} |
} |
- return all_profiles_locked; |
+ return at_least_one_regular_profile_present; |
} |
} // namespace profiles |