Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Issue 219383006: Never create an app list for an incognito profile. (Closed)

Created:
6 years, 8 months ago by tapted
Modified:
6 years, 1 month ago
Reviewers:
benwells
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina
Visibility:
Public.

Description

Never 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -29 lines) Patch
M chrome/browser/ui/app_list/app_list_controller_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_mac.mm View 1 2 3 4 5 6 7 2 chunks +5 lines, -10 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_views.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_shower_views.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/app_list/app_list_shower_views.cc View 1 2 3 4 5 6 2 chunks +14 lines, -15 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_shower_views_unittest.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
tapted
Hi Ben, does this seem like the right thing to do?
6 years, 8 months ago (2014-04-01 02:09:35 UTC) #1
benwells
On 2014/04/01 02:09:35, tapted wrote: > Hi Ben, does this seem like the right thing ...
6 years, 8 months ago (2014-04-01 02:16:21 UTC) #2
tapted
On 2014/04/01 02:16:21, benwells wrote: > On 2014/04/01 02:09:35, tapted wrote: > > Hi Ben, ...
6 years, 8 months ago (2014-04-01 02:34:20 UTC) #3
benwells
On 2014/04/01 02:34:20, tapted wrote: > On 2014/04/01 02:16:21, benwells wrote: > > On 2014/04/01 ...
6 years, 8 months ago (2014-04-01 02:41:57 UTC) #4
benwells
lgtm https://codereview.chromium.org/219383006/diff/50001/chrome/browser/ui/app_list/app_list_shower.cc File chrome/browser/ui/app_list/app_list_shower.cc (right): https://codereview.chromium.org/219383006/diff/50001/chrome/browser/ui/app_list/app_list_shower.cc#newcode32 chrome/browser/ui/app_list/app_list_shower.cc:32: DCHECK(profile_); Are these DCHECKs related to this change ...
6 years, 2 months ago (2014-10-09 05:32:33 UTC) #5
tapted
eep I will need to rebase this. Things have probably changed in the last 6 ...
6 years, 2 months ago (2014-10-09 05:52:01 UTC) #6
tapted
Hi Ben, PTAL. While updating the new tests (yay tests) I stumbled upon the root ...
6 years, 2 months ago (2014-10-20 05:36:18 UTC) #8
benwells
lgtm. looks much nicer :)
6 years, 2 months ago (2014-10-21 04:55:51 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/219383006/280001
6 years, 1 month ago (2014-11-03 06:39:38 UTC) #12
commit-bot: I haz the power
Committed patchset #8 (id:280001)
6 years, 1 month ago (2014-11-03 07:29:41 UTC) #13
commit-bot: I haz the power
6 years, 1 month ago (2014-11-03 07:30:29 UTC) #14
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ee1e5eb94d87597da109c287c44a4ffa8b379b71
Cr-Commit-Position: refs/heads/master@{#302417}

Powered by Google App Engine
This is Rietveld 408576698