DescriptionOnly return fully initialized profiles in ProfileManager::GetProfileByPath.
When a profile was loaded asynchronously, ProfileManager::GetProfileByPath could return it before it had been fully initialized, which could lead to... interesting problems. We now return null if that is the case, because callers of GetProfileByPath need to deal with a null return value anyway.
ProfileManager::GetProfile (which is supposed to create the profile synchronously if it doesn't exist) will now DCHECK when trying to get a profile that is not fully initialized.
This CL also stops AppController from trying to get a profile that has just been deleted, which would now crash otherwise.
BUG=425785
Committed: https://crrev.com/773470007a411cff16492cae579b91649d5ee8b5
Cr-Commit-Position: refs/heads/master@{#317298}
Patch Set 1 #Patch Set 2 : sync #Patch Set 3 : x #Patch Set 4 : fix #Patch Set 5 : fix? #Patch Set 6 : cleanup #Patch Set 7 : DCHECK #
Total comments: 2
Patch Set 8 : review #Patch Set 9 : sync #Patch Set 10 : cleanup #
Total comments: 2
Messages
Total messages: 25 (9 generated)
|