Descriptionchromeos: Stop calling ProfileManager::GetDefaultProfile() from extension event dispatch functions
During login, GetDefaultProfile() changes the profile which it returns from the one for the login screen to the one which is used for the user browsing session.
The problem is that GetDefaultProfile() starts to return the new profile before it gets ready to be used.
It means using GetDefaultProfile() for events which can happen during login may result in crash.
To avoid this, observers remember the profile which they should use instead of calling GetDefaultProfile() every time. By doing this, they never access the not-ready profile and the profile switching is safely performed by ChromeBrowserMainPartsChromeos::PostProfileInit which is called for the new profile.
BUG=148552
TEST=Boot a Chromebook, type the password for a user, start pressing brightness up/down key randomly, press Enter to login while keeping pressing brightness keys, ensure no crash report is sent during login.
Patch Set 1 #
Total comments: 2
Patch Set 2 : Added function comments #
Total comments: 3
Messages
Total messages: 17 (0 generated)
|