DescriptionNever create an app list for an incognito profile.
Currently the webstore API can ask for an incognito profile to be loaded
into the app list, which isn't supported. This change makes the app list
service robust against that. Instead, if an incognito profile is
requested, initialize the app list with the original profile.
This same codepath could be used to trigger an "impossible" crash
without incognito being involved. This can happen when the app launcher
is "shown" without ever being "enabled" (i.e. if it is disabled via
command line flag or editing prefs). If it is then enabled by installing
an app to a profile different to the one that was shown, the "Create*"
codepaths were not checking for a current profile at all. This would
lead to the original app list "leaking", and a crash on browser shutdown
when 2 windows are observed to close instead of just one.
To fix this and to consolidate incognito profile checks in the right
place the create functions now check profiles. Show functions just
always "create" and assume it will be a no-op if it's already created.
BUG=358135, 373689
TEST=Added regression tests AppListControllerBrowserTest.* (or see
http://crbug.com/358135 for involved repro).
Committed: https://crrev.com/ee1e5eb94d87597da109c287c44a4ffa8b379b71
Cr-Commit-Position: refs/heads/master@{#302417}
Patch Set 1 #Patch Set 2 : fixes for mac, windows, linux #Patch Set 3 : fix compile #Patch Set 4 : fix cros #
Total comments: 2
Patch Set 5 : rebase #Patch Set 6 : Add test coverage for new API: ShowForAppInstall #Patch Set 7 : Clean up creation codepaths #Patch Set 8 : rebase #
Messages
Total messages: 14 (3 generated)
|