New issue
Advanced search Search tips

Issue 921468 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocked on:
issue 277296

Blocking:
issue 877898
issue 918786



Sign in to add a comment

WebApps: Fix profile-type related issues for Web App keyed services.

Project Member Reported by loyso@chromium.org, Jan 14

Issue description

We have many types of guest profiles which may lead to crashes like this:
https://bugs.chromium.org/p/chromium/issues/detail?id=918786

Fix presence and absence of WebApp-related keyed services on various profile types.
Use go/chromium-profile-types as a guidance.

Serivices include: WebAppProdvider, WebAppMetrics, Android SMS, External Apps, System Web Apps, Site Engagement etc.
 
One thing that has made me uncomfortable about the current system we have is that there is one check (something like AreWebAppsAllowed) which we used to control some very different things:
- can web apps technically exist and be used?
- are users allowed to install web apps?
- should we record metrics for web apps?

While sometimes the implementation of these might line up, they aren't the same thing and sometimes shouldn't line up. E.g. the first two are quite different, with the first being a superset of the second.

Concretely this means I'd prefer to see separate functions for these different concepts, with names that match what they mean.
We don't use AllowWebAppInstallation everywhere where it could be a util function.
For simplicity reasons, I wanted to use AllowWebAppInstallation in all GetServiceForContext factory functions to filter out guest/incognito/system/chromeos etc profiles.
And than, "fork" two more separate functions.
Overall, agreed that we may need up to 3 functions for that.


Project Member

Comment 3 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d0133c85356fd992054d00e323e861c8e300267

commit 9d0133c85356fd992054d00e323e861c8e300267
Author: Alexey Baskakov <loyso@chromium.org>
Date: Thu Jan 17 08:27:20 2019

WebApp: Add DCHECKs to web application launch logic.

If there is no WebAppProvider for profile then there is no WebAppTabHelper.

Make sure that WebAppTabHelper exists if we launch a WebApp.

Bug: 921468
Change-Id: Ib08527f8a42c5dce87ad64de83bbfe10afd41fef
Reviewed-on: https://chromium-review.googlesource.com/c/1414411
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Alexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623618}
[modify] https://crrev.com/9d0133c85356fd992054d00e323e861c8e300267/chrome/browser/ui/extensions/application_launch.cc

Comment 4 by loyso@chromium.org, Jan 18 (5 days ago)

Blockedon: 277296

Sign in to add a comment