|
|
Created:
5 years, 8 months ago by Matt Giuca Modified:
5 years, 7 months ago CC:
chromium-reviews, tfarina, calamity, chrome-apps-syd-reviews_chromium.org, Bernhard Bauer Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFixed app launcher crashing trying to load guest profile.
Previously, if the user has never used the app launcher, and it loads
while in a guest mode browser window, the browser would crash. This was
particularly bad because it could happen during startup on Windows, even
without explicitly opening the launcher (due to app list warmup).
Now if the last used profile is the guest profile, just uses the
default.
Added DCHECKs on app list profile loads to ensure they are not guest
profiles.
BUG=468812
Committed: https://crrev.com/f5966937a7f7f8bc610ab2c86f3be0255371cf03
Cr-Commit-Position: refs/heads/master@{#330712}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Also check guest session and mac. #Patch Set 3 : Rebase. #Patch Set 4 : Remove the DCHECKs; crbug 416380 means they aren't always true. #Patch Set 5 : Fix RefusesToLoadGuestLastUsedProfile (but I think it's useless now). #Patch Set 6 : Rebase off https://codereview.chromium.org/1134533007. #Patch Set 7 : Fix Windows compile. #
Messages
Total messages: 43 (14 generated)
mgiuca@chromium.org changed reviewers: + benwells@chromium.org
mlerman@chromium.org changed reviewers: + mlerman@chromium.org
Sorry for doing a drive-by ;) I see you've touched Windows and Views code. Is there not similar Mac code that should verify the profile isn't guest or OTR? https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/app_list/... File chrome/browser/ui/app_list/app_list_service_views.cc (right): https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/app_list/... chrome/browser/ui/app_list/app_list_service_views.cc:34: DCHECK(!requested_profile->IsOffTheRecord()); Also please check requested_profile->IsGuestSession() https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/views/app... File chrome/browser/ui/views/app_list/win/app_list_service_win.cc (right): https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/views/app... chrome/browser/ui/views/app_list/win/app_list_service_win.cc:275: DCHECK(!initial_profile->IsOffTheRecord()); Can this also check !initial_profile->IsGuestSession()? The guest profile can be accessed in strange ways from the ProfileManager, and I've seen the GuestProfile (outside of Browsers) not be OffTheRecord.
Added a CHECK in Mac. Haven't tested on Mac but I assume the test suite will confirm that this doesn't break things. https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/app_list/... File chrome/browser/ui/app_list/app_list_service_views.cc (right): https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/app_list/... chrome/browser/ui/app_list/app_list_service_views.cc:34: DCHECK(!requested_profile->IsOffTheRecord()); On 2015/04/22 13:27:39, Mike Lerman wrote: > Also please check requested_profile->IsGuestSession() Done. https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/views/app... File chrome/browser/ui/views/app_list/win/app_list_service_win.cc (right): https://codereview.chromium.org/1106453002/diff/1/chrome/browser/ui/views/app... chrome/browser/ui/views/app_list/win/app_list_service_win.cc:275: DCHECK(!initial_profile->IsOffTheRecord()); On 2015/04/22 13:27:39, Mike Lerman wrote: > Can this also check !initial_profile->IsGuestSession()? The guest profile can be > accessed in strange ways from the ProfileManager, and I've seen the GuestProfile > (outside of Browsers) not be OffTheRecord. Done.
benwells: PTAL.
The CQ bit was checked by mgiuca@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1106453002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel...)
Thanks, non-owner LGTM :)
Damn, these tests are failing: AppListControllerBrowserTest.Incognito AppListControllerBrowserTest.RegularThenIncognito Because they are explicitly testing an incognito version of the app list. Does this actually make sense? I wrote this CL with the assumption that there should never be a guest or incognito app list (other than on CrOS), but it seems that there are tests expecting it to work. +tapted?
On 2015/04/27 00:40:29, Matt Giuca wrote: > Damn, these tests are failing: > > AppListControllerBrowserTest.Incognito > AppListControllerBrowserTest.RegularThenIncognito > > Because they are explicitly testing an incognito version of the app list. Does > this actually make sense? I wrote this CL with the assumption that there should > never be a guest or incognito app list (other than on CrOS), but it seems that > there are tests expecting it to work. > > +tapted? The Webstore API can pass an incognito profile to AppListService::ShowForProfile. That needs to do something sensible. Either show the app list and "work" or, if we don't show the app list, we should block the app install earlier.
On 2015/04/27 06:46:31, tapted wrote: > On 2015/04/27 00:40:29, Matt Giuca wrote: > > Damn, these tests are failing: > > > > AppListControllerBrowserTest.Incognito > > AppListControllerBrowserTest.RegularThenIncognito > > > > Because they are explicitly testing an incognito version of the app list. Does > > this actually make sense? I wrote this CL with the assumption that there > should > > never be a guest or incognito app list (other than on CrOS), but it seems that > > there are tests expecting it to work. > > > > +tapted? > > The Webstore API can pass an incognito profile to > AppListService::ShowForProfile. That needs to do something sensible. Either > show the app list and "work" or, if we don't show the app list, we should block > the app install earlier. What does it means to show the AppList for an Incognito Profile? Will the apps launch to the incognito profile, or to the original profile? I feel like this is something that shouldn't work and should be blocked, but I'd be curious what battre@'s thoughts are. Also - where is that code for the Webstore API call? Most of the calls to ShowForProfile come with a profile_path, which cannot specify the OTR of a Profile.
On 2015/04/27 13:15:55, Mike Lerman wrote: > On 2015/04/27 06:46:31, tapted wrote: > > On 2015/04/27 00:40:29, Matt Giuca wrote: > > > Damn, these tests are failing: > > > > > > AppListControllerBrowserTest.Incognito > > > AppListControllerBrowserTest.RegularThenIncognito > > > > > > Because they are explicitly testing an incognito version of the app list. > Does > > > this actually make sense? I wrote this CL with the assumption that there > > should > > > never be a guest or incognito app list (other than on CrOS), but it seems > that > > > there are tests expecting it to work. > > > > > > +tapted? > > > > The Webstore API can pass an incognito profile to > > AppListService::ShowForProfile. That needs to do something sensible. Either > > show the app list and "work" or, if we don't show the app list, we should > block > > the app install earlier. > > What does it means to show the AppList for an Incognito Profile? The app list will just show the original/non-incognito profile > Will the apps > launch to the incognito profile, or to the original profile? I feel like this is > something that shouldn't work and should be blocked, but I'd be curious what > battre@'s thoughts are. > > Also - where is that code for the Webstore API call? Most of the calls to > ShowForProfile come with a profile_path, which cannot specify the OTR of a > Profile. It's this one: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ext... For some reason installing extensions/apps in incognito has always worked -- it just installs to the original profile. If we prevent it, the UI needs to be in the webstore for a proper UX - there is b/13795858 for this.
On 2015/04/27 13:27:49, tapted wrote: > On 2015/04/27 13:15:55, Mike Lerman wrote: > > On 2015/04/27 06:46:31, tapted wrote: > > > On 2015/04/27 00:40:29, Matt Giuca wrote: > > > > Damn, these tests are failing: > > > > > > > > AppListControllerBrowserTest.Incognito > > > > AppListControllerBrowserTest.RegularThenIncognito > > > > > > > > Because they are explicitly testing an incognito version of the app list. > > Does > > > > this actually make sense? I wrote this CL with the assumption that there > > > should > > > > never be a guest or incognito app list (other than on CrOS), but it seems > > that > > > > there are tests expecting it to work. > > > > > > > > +tapted? > > > > > > The Webstore API can pass an incognito profile to > > > AppListService::ShowForProfile. That needs to do something sensible. Either > > > show the app list and "work" or, if we don't show the app list, we should > > block > > > the app install earlier. > > > > What does it means to show the AppList for an Incognito Profile? > > The app list will just show the original/non-incognito profile > > > Will the apps > > launch to the incognito profile, or to the original profile? I feel like this > is > > something that shouldn't work and should be blocked, but I'd be curious what > > battre@'s thoughts are. > > > > Also - where is that code for the Webstore API call? Most of the calls to > > ShowForProfile come with a profile_path, which cannot specify the OTR of a > > Profile. > > It's this one: > > https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ext... > > For some reason installing extensions/apps in incognito has always worked -- it > just installs to the original profile. If we prevent it, the UI needs to be in > the webstore for a proper UX - there is b/13795858 for this. I imagine it always worked because of this: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/... I see you had a CL related to this topic already: https://codereview.chromium.org/219383006 I'm uneasy about things that go noiselessly from an incognito profile to an original profile. I see that b/13795858 hasn't been working on for a while. Is there anything we can do to drive that along? +battre
Hi Dominic, Do you have thought about the App Launcher + Incognito profiles? Thanks, Mike
On 2015/04/27 13:38:05, Mike Lerman wrote: > Hi Dominic, > > Do you have thought about the App Launcher + Incognito profiles? > > Thanks, > Mike Hi. I think that heuristic makes sense. LGTM. Thanks, Dominic
Patchset #3 (id:40001) has been deleted
Note to self: This code was cleaned up by bauerb's https://codereview.chromium.org/1113333003/ (but I don't think it fixes the issue). Rebase and try again.
Confirmed that r329608 does not solve the issue (+bauerb for interest). Rebased onto ToT and going to try again to fix that test.
Patchset #4 (id:80001) has been deleted
So those DCHECKs were failing tests; turns out you can also trigger them in the real world by going to the web store in guest or incognito and installing an app. That's a rabbit hole I don't immediately want to go into (http://crbug.com/416380), so instead, I'm just taking the DCHECKs out and replacing them with TODOs. benwells: PTAL.
The CQ bit was checked by mgiuca@chromium.org to run a CQ dry run
The patchset sent to the CQ was uploaded after l-g-t-m from mlerman@chromium.org, battre@chromium.org Link to the patchset: https://codereview.chromium.org/1106453002/#ps100001 (title: "Remove the DCHECKs; crbug 416380 means they aren't always true.")
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1106453002/100001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Damn, I can't land this because AppListServiceTest is broken (just filed http://crbug.com/487951). RefusesToLoadGuestLastUsedProfile passes, but I don't think it's testing anything any more. FakeAppListProfile is bypassing the logic we want to test (that if kProfileLastUsed is a guest profile, it won't get picked... this test won't even bother to look at prefs because it uses FakeAppListProfile). RefusesToLoadGuestAppListProfile fails because it expects the code to look at kProfileLastUsed, but it doesn't. Too much fake... let's discuss on http://crbug.com/487951.
OK fixed! PTAL.
still lgtm
benwells: friendly ping
lgtm, apologies for slowness
The CQ bit was checked by mgiuca@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from battre@chromium.org Link to the patchset: https://codereview.chromium.org/1106453002/#ps140001 (title: "Rebase off https://codereview.chromium.org/1134533007.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1106453002/140001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel...)
The CQ bit was checked by mgiuca@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mlerman@chromium.org, benwells@chromium.org, battre@chromium.org Link to the patchset: https://codereview.chromium.org/1106453002/#ps160001 (title: "Fix Windows compile.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1106453002/160001
Message was sent while issue was closed.
Committed patchset #7 (id:160001)
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/f5966937a7f7f8bc610ab2c86f3be0255371cf03 Cr-Commit-Position: refs/heads/master@{#330712} |