New issue
Advanced search Search tips

Issue 627593 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocked on:
issue 665549

Blocking:
issue 609258



Sign in to add a comment

Make client send all of the icon URLs listed in the Web Manifestto the WebAPK server

Project Member Reported by pkotw...@chromium.org, Jul 12 2016

Issue description

The WebAPK server team wants this. I should investigate how painful it is to do this
 
Blocking: 609258
Labels: -Pri-3 Pri-1
I would:
- rename ShortcutInfo::icon_url_ to ShortcutInfo::best_icon_url_ and add a member ShortcutInfo::icon_urls_ with all of the icon GURLs in content::Manifest::icons
- modify chrome/android/webapk/shell_apk/AndroidManifest.xml so that it can store all of the icon URLs in addition to the "best icon URL".
- modify ManifestUpgradeDetector.java to check whether the set of icon URLs changed from what was previously cached.
Labels: Hotlist-GoodFirstBug
Status: Available
Fixed the empty status.
Labels: -Pri-1 Pri-2

Comment 7 by hanxi@chromium.org, Nov 15 2016

Blockedon: 665549
Owner: hanxi@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 18 2016

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

commit 75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e
Author: hanxi <hanxi@chromium.org>
Date: Fri Nov 18 16:22:59 2016

Send all of the icon URLs listed in Web Manifest to WebAPK Server.

So far, Chrome only sends the best icon URL to WebAPK Minter Server to
create/install WebAPKs. However, in the multiple icon world, it isn't correct
to still keep the "best icon URL" and the "best icon hash" in
AndroidManifest.xml. This is because the best icon URL will be different for
devices with different resolution. For example, a nexus 5 and an Android one
device will have different best icon URL. To prevent creating a WebAPK for
a device with a wrong baked metadata, the "best icon URL" and "best Icon
Hash" are removed from the metadata. Instead, all of the icon URLs, as well
as all of the icon Hashs are baked in the AndroidManifest.xml. These icon URLs
and Hashes are stored as a space separated single <meta-data> tag, as:
"URL1 hash1 URL2 hash2 URL3 hash3..."

Another change in this CL is to send all the icon URLs to the server, since
the server wants to check if any of these icon URLs changed before starting
a fetch of the raw icon data.

Some behavior changes are involved:
1) For creating a WebAPK, Chrome sends all icon URLs + (the best icon URL + best
icon hash + best icon raw image) to the Server. The reason to still send the best
icon is for one-off WebAPKs which use the image from Chrome, since server will fail
to fetch any of them. Server generates all the icon Hashs and bakes them in the
WebAPK's metadata in AndroidManifest.xml.
2) When checking updates, Chrome compute the best icon URL and hash when fetching
the Web Manifest, and compare the new computed hash with the one backed in
the metadata to see whether the image is updated.

The icon URL and icon Hash pairs are stored in a map in WebApkMetaData.

BUG= 627593 

Review-Url: https://codereview.chromium.org/2453423002
Cr-Commit-Position: refs/heads/master@{#433215}

[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/java/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetector.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/java/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcher.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaData.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorTest.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/junit/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorTest.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtilsTest.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkMetaDataKeys.java
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/webapk/shell_apk/AndroidManifest.xml
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/android/webapk/shell_apk/BUILD.gn
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/banners/app_banner_manager_android.cc
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/shortcut_helper.cc
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/shortcut_info.cc
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/shortcut_info.h
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.h
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/webapk/webapk_installer.cc
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/webapk/webapk_installer_unittest.cc
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/webapk/webapk_update_manager.cc
[modify] https://crrev.com/75ca9beb7e7fcd03feb23bb1e246be3ff5de6b6e/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc

Status: Fixed (was: Assigned)

Sign in to add a comment