0
Commit Graph

221 Commits

Author SHA1 Message Date
Dibyajyoti Pal
0e532fc826 dPWA: Fix flakiness in AppBanagerManager related WebAppIntegration tests
This CL fixes the flakiness in WebAppIntegration browser tests that are
related to the AppBanagerManager by terminating any pending app banner
prompts. This also includes a sample browser test that tests the
termination of pending banners.

Bug: 1324788
Change-Id: I27d8c9bbc2a6f2520c837bf0679f34eb26dd5020
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3680399
Commit-Queue: Dibyajyoti Pal <dibyapal@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011788}
2022-06-08 02:04:25 +00:00
Dave Tapuska
88d7b2e743 Rename GetMainFrame to GetPrimaryMainFrame
Progressively rename some usages of GetMainFrame to GetPrimaryMainFrame.

This is an automated change via emacs xref integration via codesearch.

BUG=1250404

Change-Id: Ibb5ca2055776693b332e26d7b348b81d65d1900c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3692390
Owners-Override: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011655}
2022-06-07 21:00:51 +00:00
Daniel Murphy
e77ee76d70 Reland "[dPWA] Install from sync command without the install task."
This is a reland of commit 5b1142444d

The original change failed due to tests triggering uninstalls in a
flaky way. While this was unique to the test and was not in production
code, some CLs were split off to solve the 'wait until all operations
have completed' problem more holistically to prevent this type of
flakiness from appearing in the future. The split out CLs were:
* https://chromium-review.googlesource.com/c/chromium/src/+/3682262
* https://chromium-review.googlesource.com/c/chromium/src/+/3681702
* https://chromium-review.googlesource.com/c/chromium/src/+/3669840

This change also added a few new features to help with the flakiness:
* The run loop in the command manager is now re-usable for multiple
  calls to await commands flushed.
* A few cleanups and upgrades to test code for better outputting.

Original change's description:
> [dPWA] Install from sync command without the install task.
>
> This change pulls out the logic from the web_app_install_task and
> manager for installing an app from sync and puts it into one command.
> This allows quite a lot of simplification in the code and allows very
> thorough testing.
>
> There are mostly no functional changes in this CL, mostly refactor. The
> only functional change here is that other installations will no longer
> be able to happen at the same time as sync installations. Hooray!
>
> Bug: 1298130
> Change-Id: Iebdcdde76b53d856891d168b9d76b0a4cbc2b086
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3614659
> Reviewed-by: Dominick Ng <dominickn@chromium.org>
> Reviewed-by: Marc Treib <treib@chromium.org>
> Commit-Queue: Daniel Murphy <dmurph@chromium.org>
> Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
> Reviewed-by: Phillis Tang <phillis@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1007948}

Bug: 1298130
Change-Id: I9a131c65fbe561ace732a3926c2a63cc7e1bf0b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3674018
Auto-Submit: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Phillis Tang <phillis@chromium.org>
Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1010118}
2022-06-02 16:01:42 +00:00
Roman Sorokin
cee04e1131 [Sheriff] Revert "[dPWA] Install from sync command without the install task."
This reverts commit 5b1142444d.

Reason for revert: Suspecting as a culprit for https://crbug.com/1329642

Original change's description:
> [dPWA] Install from sync command without the install task.
>
> This change pulls out the logic from the web_app_install_task and
> manager for installing an app from sync and puts it into one command.
> This allows quite a lot of simplification in the code and allows very
> thorough testing.
>
> There are mostly no functional changes in this CL, mostly refactor. The
> only functional change here is that other installations will no longer
> be able to happen at the same time as sync installations. Hooray!
>
> Bug: 1298130
> Change-Id: Iebdcdde76b53d856891d168b9d76b0a4cbc2b086
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3614659
> Reviewed-by: Dominick Ng <dominickn@chromium.org>
> Reviewed-by: Marc Treib <treib@chromium.org>
> Commit-Queue: Daniel Murphy <dmurph@chromium.org>
> Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
> Reviewed-by: Phillis Tang <phillis@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1007948}

Bug: 1298130, 1329642
Change-Id: I5796c3aaca9094d8129c5dab0b580dbfe56649ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3671337
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Roman Sorokin <rsorokin@chromium.org>
Commit-Queue: Roman Sorokin <rsorokin@chromium.org>
Auto-Submit: Roman Sorokin <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1008181}
2022-05-27 09:27:39 +00:00
Daniel Murphy
5b1142444d [dPWA] Install from sync command without the install task.
This change pulls out the logic from the web_app_install_task and
manager for installing an app from sync and puts it into one command.
This allows quite a lot of simplification in the code and allows very
thorough testing.

There are mostly no functional changes in this CL, mostly refactor. The
only functional change here is that other installations will no longer
be able to happen at the same time as sync installations. Hooray!

Bug: 1298130
Change-Id: Iebdcdde76b53d856891d168b9d76b0a4cbc2b086
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3614659
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
Reviewed-by: Phillis Tang <phillis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007948}
2022-05-26 19:30:55 +00:00
Ella Ge
c6bda9767a Make the dimensions to use std::minmax again
The dimensions was changed from `auto dimensions = std::minmax(...)` in
crrev.com/c/3645338
The change was because of `std::minmax` returns a reference that became
invalid in the following if condition.

Using type `std::pair<int, int>` (instead of `auto`) will cast the
reference to value, so it can also fix the issue and looks better than
two variables.


Change-Id: I889c2a160fef492c286c1cfb9e2d75b7b14c9a8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3668606
Auto-Submit: Ella Ge <eirage@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Glenn Hartmann <hartmanng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007823}
2022-05-26 14:14:36 +00:00
Dan McArdle
b71478268a Eliminate base::LowerCaseEqualsASCII in /components/webapps
This CL is a behavior-preserving refactor. It replaces calls to
base::LowerCaseEqualsASCII with base::EqualsCaseInsensitiveASCII.

We are deprecating base::LowerCaseEqualsASCII because its interface is a
mild footgun, in that it requires the second parameter to be lowercase.

See the design doc for more details.
https://docs.google.com/document/d/18zWV0zN4oAqMZpond1Ut0QviHUeHCSwCo08mqThwHkQ/edit?usp=sharing

This CL was uploaded by git cl split.

R=dominickn@chromium.org

Bug: 1326529
Change-Id: I3d6255287b8c9e0f65534d913553c5760fb9384a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3658087
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Auto-Submit: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1006023}
2022-05-21 00:22:00 +00:00
Ella Ge
170da3d081 Improve SkipServiceWorkerCheck feature flags comments
Make it clear that one of the flags affect everything and the
other is for "installable" but not "promotable"

Bug: 1322139
Change-Id: Ie2a009ca8f509f660811aac648ee51fa665bcfe5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3655313
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1005923}
2022-05-20 20:03:11 +00:00
Ella Ge
6b8adc1683 InstallableManager wait for screenshots fetch to complete
This CL fixes the richer install bottom sheet not showing correctly
with flag "SkipServiceWorkerCheckAll" enabled.

The issue is due to InstallableManager not checking whether the
screenshots fetching was completed. It worked before since
`params.fetch_screenshots` always set together with `params.has_worker`
and worker checks was later/slower than the screenshots.


Bug: 1322139

Change-Id: Id0cbb48cd0f133d4be586e41e8e19b95b285f27c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3645338
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1005273}
2022-05-19 17:12:58 +00:00
Ella Ge
76c6267af8 Add tests to check AppBanners with ServiceWorker criteria removed
This moves the feature flags out of the android folder
and moves the "check_worker = !enabled"logic to the AppBannerManager
base class so they can be used in browsertests.

The flags should only be enabled on Android.

Bug: 1322139
Change-Id: Ia4fdd10de99355f5a19d71417dd33b15bdfe50fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3642178
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Peter Conn <peconn@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1002791}
2022-05-12 19:31:12 +00:00
Ella Ge
68c401c17d Add the remove service worker requirement experiment behind flag
2 flags:
kSkipServiceWorkerCheckInstallOnly: site with no service worker can
install WebAPK, but no banner show
kSkipServiceWorkerCheckAll: site with no service worker will act as
it has one: show app banner, can install WebAPK.

Design doc:
https://docs.google.com/document/d/1ym1kOtSZQIHvqkWUfwEfOseZ4b29rGNqHztoGj0VhQo/edit#

Bug: 1322139

Change-Id: I604ca6a86737cbbd223d7cdecedd678a3681f991
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3606471
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1002727}
2022-05-12 18:01:30 +00:00
Peter Wen
ff01a366a4 Android: Remove unnecessary deps on jni_java
When a target is not using anything in jni_java, it should not depend on
it. If it has no JNI then it would not need the JNI annotation processor
either.

Bug: 1323311
Change-Id: I9796d50cc2bd9d54166f75985d1efcba03777728
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3637831
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Ioana Pandele <ioanap@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1001654}
2022-05-10 19:10:55 +00:00
Hyowon Kim
30e8911ffd [mparch] Use PrimaryPageChanged in InstallableManager.
This CL replaces DidFinishNavigation with PrimaryPageChanged in
InstallableManager. Listening to PrimaryPageChanged is preferred to
listening to DidFinishNavigation and checking IsInPrimaryMainFrame,
!IsSameDocument, and HasCommitted.

Bug: 1269645
Change-Id: I67518a466faf69981fec40703ed6377244b2dfcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3631893
Commit-Queue: Hyowon Kim <hyowon@igalia.com>
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1001350}
2022-05-10 05:02:00 +00:00
dpapad
a1281e541d Fix tools/resources/svgo_presubmit.py violations in components/
Produced by running the following command
./tools/resources/svgo.py `find components/ -name '*.svg'`

Also fixing a couple new violations that cropped up in folders that
have already been fixed in previous CLs. Ultimately turning these from
warnings to errors seems best, to guarantee that such violations don't
crop up (any false positives should be addressed by excluding specific
files from these checks).

This is the last CL fixing existing svgo_presubmit.py violations, and
`git cl presubmit --files=*.svg` should no longer produce any warnings
or errors.

Bug: 1309977
Change-Id: I06a7a50eb7fbc5b9f1eee9e89e652f7b2262db25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3629911
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: John Lee <johntlee@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1000481}
2022-05-06 18:40:50 +00:00
Ella Ge
e36331e3d2 Rename two "installable" fields in AddToHomescreenDataFetcherTest
`is_installable_` and `should_installable_time_out_` is used to indicate
that whether it has service worker and whether the service worker check
timed out. Using "Installable" here is misleading.
Renaming them to `has_worker_` and `should_service_worker_time_out_`.

Beside, changing the order in TestInstallableManager.GetData
to match the real InstallableManager.


Bug: 1322139
Change-Id: I159f9a7c7fb9ec2f774ca3b2071637c3077510c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3625609
Commit-Queue: Ella Ge <eirage@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#999746}
2022-05-05 04:24:06 +00:00
Peter Wen
4748384399 Android: Remove unused base_java deps
Now that build_java and jni_java have been moved out of base_java's
public_deps and base_java no longer contains annotations, remove deps on
base_java that are now unnecessary (Removed 169/608 base_java deps or ~27.8%).

Bug: 1038372
Change-Id: I520f9cd849c9f142948941af5d7fe108b3d8c390
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3623861
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#998944}
2022-05-03 17:36:31 +00:00
Ben Mason
216c738cae Updating XTBs based on .GRDs from branch main
Change-Id: I2638c2c37b7ad12b81d3b16a1d08ad87e460a78b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3615744
Auto-Submit: Ben Mason <benmason@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#998094}
2022-04-30 14:25:57 +00:00
Peter Wen
8a196c163b Android: Depend on jni_java explicitly
This CL moves jni_java from base_java's public_dep to a regular dep.
This means that targets which only need jni_java do not need to depend
on the entirety of base_java. A future CL will remove base_java from
targets that no longer need it as a result of this CL and this other CL
for build_java: https://crrev.com/c/3606468

By using dep_operations.py split and then dep_operations.py remove, this
CL avoided adding 326 instances of jni_java across 201 files.

Bug: 1038372
Change-Id: Ifd411a923dc834d37e0a4c80daf5797c355c6f52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3615049
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#997965}
2022-04-29 22:55:06 +00:00
Ben Mason
07a3859a0a Updating XTBs based on .GRDs from branch main
Change-Id: I48736850f15b7da4e66abfb1a450eb2ea5b8e5cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3615872
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ben Mason <benmason@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#997690}
2022-04-29 14:12:38 +00:00
Ben Mason
31dc37e88d Updating XTBs based on .GRDs from branch main
Change-Id: I91d5f084dcac1c06610e36a3e2e62e991aceacae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3614027
Auto-Submit: Ben Mason <benmason@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#997189}
2022-04-28 14:01:39 +00:00
Phillis Tang
4200af7ee5 webappcommand: create FetchManifestAndInstallCommand
Create `FetchManifestAndInstallCommand` that uses a NoOpt CommandLock to
retrieve and validate manifest then enqueue a `WebAppInstallCommand`
that performs the install. This is used by omnibox install/menu app
install from users.

A follow-up CL will be made to replace
`WebAppInstallManager::InstallWebAppFromManifest` with this
new command and add tests.

Bug: 1298130
Change-Id: I40731e04430f7b1a80195185b1a710bd22f05a23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3609215
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#997094}
2022-04-28 08:14:50 +00:00
Peter Wen
494cdd47f9 Android: Depend on build_java explicitly
This CL moves build_java from being a public_dep of base_java to a
regular dep. This means other targets that need to depend on build_java
must do so explicitly. Since build_java and base_java are not closely
related, this de-coupling (and when jni annotations are similarly moved)
will reduce the number of targets that depend on base_java only for its
annotations, thus speeding up builds when making changes to base_java.

By using dep_operations.py, this CL avoided adding build_java to 224+
targets that already depended on base_java across 194 files. There are
more opportunities to remove unnecessary dependencies on build_java, but
that is left for future CLs in order to prioritize removing build_java
from base_java's public_deps.

Initial estimate (after jni_java is similarly moved out of public_deps)
is that we can remove more than 265+ dependencies on base_java across
~153 files.

Bug: 1038372
Change-Id: Ia5acc70af449f10363bd7e123473e0823ce31bb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3606468
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#996885}
2022-04-27 21:12:52 +00:00
Ben Mason
0f1642f81c Updating XTBs based on .GRDs from branch main
Change-Id: I2c821889ddb0b114a927824b9e6c4d91c7733059
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3610822
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ben Mason <benmason@chromium.org>
Cr-Commit-Position: refs/heads/main@{#996698}
2022-04-27 14:48:21 +00:00
Finnur Thorarinsson
d996a878be [Android]: Default offline experience part 2.
This activates the same default offline experience for
Android as the one we have on Desktop. No effort was
made to make the page look better on mobile. Simply
wiring things up.

Bug: 1312364

Change-Id: I513297288d95e1dea20414bcceb6f464bcea1144
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3559492
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Ella Ge <eirage@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/main@{#995699}
2022-04-25 17:56:12 +00:00
Susanne Westphal
8e116dca55 [WebApk-Weblayer] Add Toasts for user-feedback about failed WebAPK
installations.

Before we were only showing toasts for WebAPK installations scheduled
in Chrome. When the installation is already in progress, a toast is
shown and if the installation failed a shortcut is created. This
behavior did not change through this CL.

This CL implements showing toasts also when the installation was
scheduled in WebLayer. We show the same text as in Chrome if the
installation is already in progress. We also show a toast if the
installation failed instead of adding a shortcut, because we would
have to set the default application that should be used when opening
the shortcut, which could be Chrome, but Chrome might not be installed,
so for now the behavior is to just tell the user that the installation
failed via a Toast.

Bug: 1101999
Change-Id: I5688efaf20e06b255b8f2ac4772addda09fb3108
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3579109
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#995633}
2022-04-25 09:57:42 +00:00
Susanne Westphal
3508136e8c [WebApk-Weblayer] Weblayer client for installing WebAPKs using the
WebApkInstallCoordinator-service in Chrome.

This CL enables the WebApk installation via BottomSheet/BannerUI or
Ambient Badge in Weblayer. If a website fulfills PWA criteria and
site-engagement is reached, preferably a bottom sheet with an install
button is shown, alternatively a BannerUI or Ambient Badge. When the
user triggers the install the WebAPK-proto is built in WebLayer and
passed, together with a callback, to Chrome's WebApkInstallCoordinator-
service.
(CL: https://chromium-review.googlesource.com/c/chromium/src/+/3503251)
The callback is called by the service as soon as the installation
finished or failed.
The binary size increase is caused by newly implemented classes, the
additional dependency of Promise.java (which is used for triggering the
nested callback functions when connecting to the Chrome-service and
the forwarding of the callback result which was received from the
service) and a dependency to //components/signin which seems to be
the result of some internal optimization of the build, but the overall
increase through that is within limits.

Follow up CLs:
- Display a Toast in the failure case and when the installation starts.
- Only show the install-banner if a Chrome version that contains the
  service is installed on the device.
- UMA logging.
- BrowserTest for WebApkInstallScheduler.

Binary-Size: See commit description.
Bug: 1101999
Change-Id: I7cb9a48235873c607efd12c83332c0bfbdc23865
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3542366
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Peter Conn <peconn@chromium.org>
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#994580}
2022-04-21 09:31:25 +00:00
Rayan Kanso
2a2db755fd [WebAPK] Don't show install banner for non-http(s) manifests
Change-Id: Iadd10d509d37c910520f35ebca5a51f04e099875
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3581766
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#991061}
2022-04-11 16:51:29 +00:00
Susanne Westphal
1156ecb1e3 [WebApk-Weblayer] Chrome service for scheduling webapk installs in
Weblayer

This CL adds an Android service that can be enabled with a features flag
via the command line if the build is a development build.
($BUILD_DIR/bin/chrome_apk run --args='--enable-features=\
 WebApkInstallService')
The service receives the WebAPKs prebuild WebAPK-proto, its primary
icon, and a boolean if this icon is maskable from the client. (The
service is not able to build the proto itself in all cases as for some
websites e.g. login credentials have to be available so that the website
fulfill the PWA criteria.)
The service passes the values to the webapk_install_service that is then
handling the installation. After the installation succeeded or failed,
a callback function that the client passes to the service is invoked
with the result value, so that the client is able to handle the failure
case.
For UMA and UKM logging new sources in ShortcutInfo and
WebapkInstallSource have been added and installations and launches
are logged with these values.
Possible failure case is a too large payload (WebAPK + Icon) passed to
the service, which will result in a RemoteException that can be handled
by the client-app.


Bug: 1101999
Change-Id: Iac47ccab3fd5eb24447719bafa59c8992b14b559
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3503251
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#991041}
2022-04-11 16:03:26 +00:00
Ella Ge
e3d4ff1bab Add UKM to record AddToHomeScreen usages.
New UKM collection review:
https://docs.google.com/document/d/1SBraTg9t1GsJ0DA4hAAVoK_JAqXq6E6BLjeJtL7PCfo/edit#


Bug: 1307362
Change-Id: I35030e8258bef7915e468107bfef317d6eb3d128
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3560726
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990519}
2022-04-08 19:03:18 +00:00
Ben Mason
08a8caf3e2 Updating XTBs based on .GRDs from branch main
Change-Id: Ia5e98067f8ebf0741571ebc4fbd1ada5f9d40527
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3576280
Auto-Submit: Ben Mason <benmason@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ben Mason <benmason@chromium.org>
Owners-Override: Ben Mason <benmason@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990050}
2022-04-07 19:14:12 +00:00
Daniel Murphy
19a34bfe5b [dPWA] Explicitly pass source to uninstall, and require install source.
This patch fixes the incorrect assumption that we can determine the
installation source from the uninstallation location, and makes the
installation source a bit more required for install tasks and options.

This also updates some variable names from install_source to
install_surface, which is a more accurate name. Work to rename the whole
enum is in https://crbug.com/1313273.

The only functional change in this CL is in
externally_managed_app_install_task.cc:187, which sets the source of the
uninstall correctly now. This fixes an issue where replaced placeholder
apps aren't uninstalled correctly.

All other changes are purely refactoring.

Bug: 1312061
Change-Id: I82968bc91e12e8d60736ed32af9782312941d98e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3570646
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Tim Sergeant <tsergeant@chromium.org>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Auto-Submit: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Edman Anjos <edman@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Tommy Martino <tmartino@chromium.org>
Reviewed-by: Aga Wronska <agawronska@chromium.org>
Reviewed-by: Phillis Tang <phillis@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Glenn Hartmann <hartmanng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#989943}
2022-04-07 15:29:36 +00:00
David Sanders
2f350e61cd Use forward decls to remove includes in installable_metrics.h
Also adds some includes to other files which were
getting them transitively, to fix the build.

Bug: 242216
Change-Id: I1424e42c9ebcd22f1ae9d9418789d7545196fe84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3575494
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: David Sanders <dsanders11@ucsbalum.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#989754}
2022-04-07 02:20:53 +00:00
Ella Ge
86476b74aa Log WebApkInstallResult UMA
Add a histogram to track the WebAPK install result: success or why it
failed.

Bug: 1313548
Change-Id: I525a9b412b50c4935e8dfff9c0953c4faffb34cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3571945
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#989692}
2022-04-07 00:05:37 +00:00
mlcui
287f955132 Prepare translation files for the addition of Welsh
The corresponding internal change to add it to the translation pipeline
can be found at go/ksrhy.

This change:
- adds Welsh to translation_expectations.pyl to fix presubmit errors
  (this needs to be done to add it to the translation pipeline as well),
- adds Welsh as a translation to every GRD file listed under
  desktop_grds in the aforementioned expectations file,
- creates placeholder XTB files to the aforementioned GRD files,
- and adds Welsh to default_embedded_i18_locales to fix a build error
  with it missing. This is temporary and will be removed in the future
  once we add Welsh to all_chrome_locales.

Note that this change does NOT add Welsh to the outputs of all files
like https://crrev.com/c/3498882, as doing so would expose some
assumptions that "the list of Android locales is the list of all Chrome
locales". That will come in a separate CL which will be merged once
those assumptions are fixed.

Bug: b/192306364
Change-Id: Ic818cff8d8beb5b757012a66b8db52caa03b48d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2988903
Reviewed-by: David Bienvenu <davidbienvenu@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Michael Cui <mlcui@google.com>
Cr-Commit-Position: refs/heads/main@{#989310}
2022-04-06 06:25:00 +00:00
Susanne Westphal
43309166e6 [WebApk-Weblayer] Move WebApkInstallResult to components.
The WebAPK installation result will be used in Chrome, as well as in
Weblayer when scheduling the install via the Chrome-Service, so the
enum is moved to components to make it accessible in the weblayer-folder.

The enum is also used in Clank, so the current enum is kept for now, with
the same entries, and after the CL in Clank landed it will be removed.
With the current implementation both imports are supported in Clank:
import org.chromium.components.webapps.WebApkInstallResult;
import org.chromium.chrome.browser.webapps.WebApkInstallResult;

Change-Id: I7bcf6be423faf1990f60d1dc3f7e70006abb13f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3557277
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987563}
2022-03-31 18:49:58 +00:00
Daniel Murphy
f4d9498948 Revert "[Desktop PWAs] Implement short-term Create Shortcut fix."
This reverts commit 8685f96136.

Reason for revert: Breaks quite a few of our integration tests. Most concerning is that sync doesn't seem to be working properly now. See bugs below

Original change's description:
> [Desktop PWAs] Implement short-term Create Shortcut fix.
>
> This CL implements the proposal outlined at
> go/create-shortcut-regression which boils down to:
> - The 'Install Site' menu option will appear for any app with a manifest
>   and respect the manifest as much as possible (implemented by changing
>   AppBannerManager's concept of Installability).
> - Create Shortcut will always use the current page's URL and ignore the
>   majority of the manifest.
>
> See https://crbug.com/1216457#c44 for a more detailed description of the
> motivation behind these changes.
>
> Bug: 1216457
> Change-Id: Ibb0e4feca8fc41d89e88dca6f9bfba773f5bff0e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3508988
> Reviewed-by: Daniel Murphy <dmurph@chromium.org>
> Reviewed-by: Glen Robertson <glenrob@chromium.org>
> Reviewed-by: Dominick Ng <dominickn@chromium.org>
> Commit-Queue: Christopher Lam <calamity@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#987275}

Bug: 1216457, 1311896, 1311892, 1311895, 1311899
Change-Id: Iad7ad3668a875dc66f92edf255043e0b266e97ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3564363
Auto-Submit: Daniel Murphy <dmurph@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Phillis Tang <phillis@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Owners-Override: Owen Min <zmin@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987561}
2022-03-31 18:44:28 +00:00
Gabriel Charette
bdd68018e8 [base] Remove unused post_task.h includes
This CL is a no-op.

Bug: 1026641
AX-Relnotes: n/a
Change-Id: If45d30e748b65097bb6be666dc305c27183d83ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3555247
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Owners-Override: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987328}
2022-03-31 04:00:05 +00:00
Gabriel Charette
d87f10f467 [base] IWYU for base::Time
This CL is a no-op.

Only fixing instances where base::Time (and Ticks/Delta) is used in
a statement (i.e. not as a parameter to avoid adding includes in mere
overrides). Skipping pointer and reference qualified instances.

i.e. matches this regex:
'(\n *[^/\n][^/\n][^/\n]*base::(Time|Thread)(Ticks|Delta)?\b[^*&][^)]*;)'

and skipping files that have any existing fwd-decl for any of the
variants.

This is a prereq to remove unused base/task/post_task.h includes in
https://chromium-review.googlesource.com/c/chromium/src/+/3555247

Bug: 1026641
Change-Id: I87b43a8dc92bdceb67f4bd59b327b54813aa72a6
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3557354
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987283}
2022-03-31 00:44:22 +00:00
Christopher Lam
8685f96136 [Desktop PWAs] Implement short-term Create Shortcut fix.
This CL implements the proposal outlined at
go/create-shortcut-regression which boils down to:
- The 'Install Site' menu option will appear for any app with a manifest
  and respect the manifest as much as possible (implemented by changing
  AppBannerManager's concept of Installability).
- Create Shortcut will always use the current page's URL and ignore the
  majority of the manifest.

See https://crbug.com/1216457#c44 for a more detailed description of the
motivation behind these changes.

Bug: 1216457
Change-Id: Ibb0e4feca8fc41d89e88dca6f9bfba773f5bff0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3508988
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Glen Robertson <glenrob@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Christopher Lam <calamity@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987275}
2022-03-31 00:25:55 +00:00
Ben Mason
0556ee2ed2 Updating XTBs based on .GRDs from branch main
Change-Id: Ie150eecdf7cf33058545fec89bdc850a66727fdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3550775
Auto-Submit: Ben Mason <benmason@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#985672}
2022-03-26 14:19:49 +00:00
David Sanders
dcecd55f27 Remove unused include of //base/process/process_handle.h
Also adds some includes and forward decls to other files
which were getting them transitively, to fix the build.

Bug: 242216
Change-Id: I4277dea7110302945a0061db500aa0be1426ea63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3544529
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: David Sanders <dsanders11@ucsbalum.com>
Cr-Commit-Position: refs/heads/main@{#984218}
2022-03-23 07:34:08 +00:00
Susanne Westphal
2d0d50afdb [WebApk-Weblayer] Move webapk BuildProto function and unittests to
components

BuildProto-function is not specific to chrome and will also be needed
in Weblayer, so it was moved to components together with it's unittests.
No logic has been changed.

Tests: ninja -C out/Default components_unittests \
           && ./out/Default/bin/run_components_unittests \
           --gtest_filter='*WebApkProtoBuilder*'

Bug: 1101999
Change-Id: I5337beaa35adffbd66dca769f42709959e71a6cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3507998
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#982702}
2022-03-18 14:41:58 +00:00
Finnur Thorarinsson
f0eb3459ba [A2HS]: Prefer title in A2HS suggestion over blanks in app name.
If an app specifies...
<meta name="application-name" content="&nbsp;">
... that value (space) is not a great thing to use as a value
to suggest to the user as a name for the shortcut, and is ignored
by Firefox, for example.

This CL trims the whitespace before checking if string is empty.

Bug: 1253299
Change-Id: I9b232c12a3055d0980267cd0a415486551c13e94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3525397
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/main@{#981730}
2022-03-16 17:49:26 +00:00
Jarryd
496743cd78 PWA: Send manifest policy to PermissionsPolicy before serializing.
This change takes the manifest parsed policy and sends it to the
PermissionsPolicyParser, which better handles input validation
and other concepts specific to Permissions Policy. The returned
value is then stored in the Web App Provider system.

 * Remove blink::Manifest::PermissionsPolicyDeclaration in favor of
   blink::ParsedPermissionsPolicyDeclaration.
 * Refactor ManifestParser to take an ExecutionContext instead of
   FeatureContext from ManifestManager, which is required in order to
   to use the PermissionsPolicyParser method.

Bug: 1238341
Change-Id: Ic874bf4f89beb72f781645c32ab0d8c202ad494a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3415495
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
Auto-Submit: Jarryd Goodman <jarrydg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#980643}
2022-03-14 17:30:13 +00:00
Rayan Kanso
85bea3775a [WebAPK] Use the display_override field from the manifest.
Bug: 1222578
Change-Id: Ib7b3dfe33693ea25c900d4325938e572fb8bb11f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3509927
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979717}
2022-03-10 12:38:06 +00:00
Eric Willigers
6c27388291 components/webapps: Various clang-tidy cleanups
Replace push_back(Class(args)) with emplace_back(args)

In method declarations, avoid declaring by-value arguments const.

Initialize various member variables at definition.

No need for std::move when called method accepts a const reference.

Declare various methods const.

Rename const InstallableData& method argument from 'result' to 'data'
for consistency with derived classes.

AppBannerManager: 
Change-Id: I469ce61b6764df2e71f2205cf2470ba07e040837
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3509512
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979474}
2022-03-09 23:05:34 +00:00
Lijin Shen
2c9ac430de Revert "[Messages] Launch PWA install message"
This reverts commit fba070ce31.

Reason for revert: The feature is reported to be spammy after full launch.
crbug.com/1303987

Original change's description:
> [Messages] Launch PWA install message
>
> Message UI is an alternative to Infobar UI.
>
> Approval: https://crbug.com/1230203#c72
>
> Bug: 1247374
> Change-Id: I0882a8ead5dfd7792faf24b64feca844d87e4f11
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3482361
> Reviewed-by: Aishwarya Rajesh <aishwaryarj@google.com>
> Reviewed-by: Alan Cutter <alancutter@chromium.org>
> Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
> Commit-Queue: Lijin Shen <lazzzis@google.com>
> Cr-Commit-Position: refs/heads/main@{#976777}

Bug: 1247374
Change-Id: I22e3223b6457cd536d9892930405a9219e3be83b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3508228
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Commit-Queue: Lijin Shen <lazzzis@google.com>
Cr-Commit-Position: refs/heads/main@{#978985}
2022-03-09 00:30:19 +00:00
Susanne Westphal
dfcb360c78 Get ModalDialogManager from window activity
The AddToHomeschreenCoordinator will also be used from WebLayer, there
the WeblayerShellActivity and ModalDialogManagerHolder are loaded in
different ClassLoaders so the ModalDialogManager needs to be accessed
directly via the WindowActivty. The Context used to call
AddToHomeschreenCoordinator constructor needs to be the
WindowAndroid.getContext() as the WindowAndroid.getActivity() only is
the WeblayerShellActivity.


Bug: 1101999
Change-Id: I04ae68eeca3183de80c1e2bb6beadca51827f0f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3497038
Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Glenn Hartmann <hartmanng@chromium.org>
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977710}
2022-03-04 17:40:19 +00:00
Susanne Westphal
8a7ce2750d Add PwaBottomSheetController to WebLayer
Because of different classloaders in the weblayerShellActivity
and weblayer support library the Context instead of the Activity
needs to be passed to the PwaBottomSheetController.

Bug: 1101999
Change-Id: Iadf7831c2fb5a7154edb739f9554577cfed7f8d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3497806
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977583}
2022-03-04 10:02:01 +00:00
Alexander Bolodurin
011cc90d6a Extend webapps::UninstallResultCode
Add new uninstall result codes:

- kNoAppToUninstall: a no-op uninstall, where an app could not be
  uninstalled because it could not be found, which could be treated as a
  success case.
- kCancelled: uninstall operation was cancelled (can be used in
  dialogs using UninstallResultCode).

Bug: 1300760
Change-Id: Icd00b4dcf3cbd94447501272b2f5dd8b022d814b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3499681
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Alexander Bolodurin <alexbn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977525}
2022-03-04 06:52:09 +00:00