|
|
DescriptionTake Murmur2 hash of untransformed icon when creating WebAPK part 2/2
This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap
at the icon URL prior to any transformations being applied to the bitmap (such
as encoding/decoding the bitmap). The icon hash is used to determine whether the
icon that the user sees matches the icon of a WebAPK that the server generated
for another user.
The icon could be dynamically generated and:
- use the same icon URL for all users
- be visually different for each user
If the hashes match the server can vend the WebAPK that it
previously generated to other users. Vending previously generated WebAPKs is
faster than creating a new WebAPK for each "create WebAPK" request.
BUG=624059
TEST=ManifestUpgradeDetectorFetcherTest.*
Committed: https://crrev.com/9190e10d578823e6e353d55cf9f3c436d8dc1099
Cr-Commit-Position: refs/heads/master@{#419182}
Patch Set 1 #
Total comments: 13
Patch Set 2 : Merge branch 'master' into icon_hasher2 #Messages
Total messages: 43 (21 generated)
Description was changed from ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest ========== to ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ==========
pkotwicz@chromium.org changed reviewers: + hanxi@chromium.org
Xi can you please take a look?
Only have some comments on tests, mostly looks good:) https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java (right): https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java:157: public void testNoServiceWorkerNotInstallable() throws Exception { This test doesn't seem to be related to the changes here, it is more likely a test for InstallableManager. If you want to test whether the OnGotNonWebApkCompatibleManifest() is called, why not try the case of an empty murmur2Hash or Manifest URL has a passwords? https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java:176: public void testCorruptedIconNotInstallable() throws Exception { This sounds like another test for data.is_installable check. I am confused when trying to understand the purpose of these two tests. Do you want to test the logic in ManifestUpgradeDetectorFetcher::OnDidGetInstallableData() and ManifestUpgradeDetectorFetcher::OnGotIconMurmur2Hash() for the failure cases that calling OnGotNonWebApkCompatibleManifest()? These two seems are both covered by the check: if (data.error_code != NO_ERROR_DETECTED ||...) { OnGotNonWebApkCompatibleManifest(); } Sounds like the second one is good enough for this check. If adding more tests, it might be more straight forwards to mock the value of the murmur2Hash for the check: if (icon_murmur2_hash.empty()); or to cover a case of !AreWebManifestUrlsWebApkCompatible(). Any thought? https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... File chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc (right): https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc:129: if (data.error_code != NO_ERROR_DETECTED || Why don't check data.is_installable?
Xi can you please take a look? https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java (right): https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java:157: public void testNoServiceWorkerNotInstallable() throws Exception { Yes, there are many error cases. The service worker error case is one of many. It is convenient because there is already test data for this error case. (I could write many more tests) There are already browser tests for InstallableManager such as InstallableManagerBrowserTest.CheckManifestCorruptedIcon I did not pick a different scenario to test (such as a URL in the manifest using a password because I am lazy) https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java:176: public void testCorruptedIconNotInstallable() throws Exception { The reason that I have two tests is that the corrupted icon case is very special. When the icon is corrupted InstallableData::is_installable == true but InstallableData::error_code != NO_ERROR_DETECTED https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... File chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc (right): https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc:129: if (data.error_code != NO_ERROR_DETECTED || Because data.is_installable is true if there is a problem with the icon AppBannerManager::OnDidPerformInstallableCheck() also checks the error code
lgtm with CL description updated. https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java (right): https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java:157: public void testNoServiceWorkerNotInstallable() throws Exception { On 2016/09/12 19:43:59, pkotwicz wrote: > Yes, there are many error cases. The service worker error case is one of many. > It is convenient because there is already test data for this error case. (I > could write many more tests) > > There are already browser tests for InstallableManager such as > InstallableManagerBrowserTest.CheckManifestCorruptedIcon > > I did not pick a different scenario to test (such as a URL in the manifest using > a password because I am lazy) I understand since you added the remaining parts of CL (https://codereview.chromium.org/2262583002/) into this CL, and the tests are more likely for that code, rather than the murmur2Hash used by ManifestUpgradeDetector. Maybe add that part into the CL description as well. I think it helps to reduce confusion why the tests doesn't seem to be related to the CL title. https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java:176: public void testCorruptedIconNotInstallable() throws Exception { On 2016/09/12 19:43:59, pkotwicz wrote: > The reason that I have two tests is that the corrupted icon case is very > special. When the icon is corrupted > > InstallableData::is_installable == true but > InstallableData::error_code != NO_ERROR_DETECTED > Agree, this one is definitely needs to be kept. https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... File chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc (right): https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc:129: if (data.error_code != NO_ERROR_DETECTED || On 2016/09/12 19:43:59, pkotwicz wrote: > Because data.is_installable is true if there is a problem with the icon > > AppBannerManager::OnDidPerformInstallableCheck() also checks the error code Got it, thanks!
Description was changed from ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ========== to ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. This CL also introduces ManifestUpgradeDetectorFetcher#Callback#onGotNonWebApkCompatibleManifest() which is called when the Web Manifest is not WebAPK compatible such as when the Web Manifest icon URLs refer to non existant resources BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ==========
pkotwicz@chromium.org changed reviewers: + dominickn@chromium.org
Dominick for OWNERS
https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java (right): https://codereview.chromium.org/2331773002/diff/1/chrome/android/javatests/sr... chrome/android/javatests/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetectorFetcherTest.java:157: public void testNoServiceWorkerNotInstallable() throws Exception { On 2016/09/12 19:58:49, Xi Han wrote: > On 2016/09/12 19:43:59, pkotwicz wrote: > > Yes, there are many error cases. The service worker error case is one of many. > > It is convenient because there is already test data for this error case. (I > > could write many more tests) > > > > There are already browser tests for InstallableManager such as > > InstallableManagerBrowserTest.CheckManifestCorruptedIcon > > > > I did not pick a different scenario to test (such as a URL in the manifest > using > > a password because I am lazy) > > I understand since you added the remaining parts of CL > (https://codereview.chromium.org/2262583002/) into this CL, and the tests are > more likely for that code, rather than the murmur2Hash used by > ManifestUpgradeDetector. Maybe add that part into the CL description as well. I > think it helps to reduce confusion why the tests doesn't seem to be related to > the CL title. I'd prefer if you split these tests into a separate C, since they are orthogonal. It also protects the rest of the CL from having to be reverted in the case where something goes wrong with one of the unrelated tests (or vice-versa) :) https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... File chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc (right): https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc:143: icon_hasher_->DownloadAndComputeMurmur2Hash( We already have the parsed icon in data.icon and icon_. It seems quite wasteful to download it again. Is it possible to split up downloading and computing the hash so you can just pass the SkBitmap and use its bytes? You would only be accessing bytes, not decoding anything, so I don't think there's a security issue. That may also have the advantage of making this synchronous, so you could just stack-initialise icon_hasher_ rather than having it as a member.
Description was changed from ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. This CL also introduces ManifestUpgradeDetectorFetcher#Callback#onGotNonWebApkCompatibleManifest() which is called when the Web Manifest is not WebAPK compatible such as when the Web Manifest icon URLs refer to non existant resources BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ========== to ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ==========
Dominick, can you please take another look? https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... File chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc (right): https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc:143: icon_hasher_->DownloadAndComputeMurmur2Hash( An SkBitmap is a decoded icon. The SkBitmap does not know about the image's source bytes. I considered modifying WebContents::DownloadImage() and ImageDownloadCallback to return a Murmur2 hash of the icon's unmodified bytes. I decided against this because WebAPKs are an experimental feature. The icon downloaded by WebApkIconHasher should be in the HTTP cache so the download should be cheap (no additional network traffic). I agree that this is wasteful but I do not have a better idea. Dominick, do you have any ideas?
Dominick, can you please take another look?
lgtm - would appreciate a response to my question before you land. :) https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... File chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc (right): https://codereview.chromium.org/2331773002/diff/1/chrome/browser/android/weba... chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc:143: icon_hasher_->DownloadAndComputeMurmur2Hash( On 2016/09/13 22:23:33, pkotwicz wrote: > An SkBitmap is a decoded icon. The SkBitmap does not know about the image's > source bytes. > > I considered modifying WebContents::DownloadImage() and ImageDownloadCallback to > return a Murmur2 hash of the icon's unmodified bytes. I decided against this > because WebAPKs are an experimental feature. > > The icon downloaded by WebApkIconHasher should be in the HTTP cache so the > download should be cheap (no additional network traffic). > > I agree that this is wasteful but I do not have a better idea. Dominick, do you > have any ideas? Acknowledged. I was worried that would be the case. Making WebContents::DownloadImage return a hash is also suboptimal because then there would be redundant work for a bunch of other places which use that method. Instead, would it be sufficient to change InstallableManager and have it run ManifestIconSelector::FindBestMatchingIcon when InstallableParams::check_installable is true? Then the upgrade detector would not fetch an icon, but it would have the URL which it could then pass off to the hasher. If the hash comes back different we'd need to run InstallableManager again to get the icon. This doesn't solve the redownloading when you install the WebAPK initially to compute the hash for the first time, but it'll make each subsequent upgrade request more efficient (I'm imagining that WebAPKs won't need to be upgraded too often, so this will halve the number of image bytes each upgrade request has to fetch). WDYT? By the way, this proposal shouldn't be in this CL - we should have metrics for how often the upgrade detection runs, and how often it says that an upgrade is needed (and what the reason for the upgrade is). If we find that upgrades hardly ever happen, it'll be worth optimizing the data they consume. Are there plans to add upgrade request metrics?
I think that your proposal makes sense. As you said, we will first collect upgrade metrics. I have added "WebAPK update metrics" to http://www.crbug.com/626510
The CQ bit was checked by pkotwicz@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from hanxi@chromium.org Link to the patchset: https://codereview.chromium.org/2331773002/#ps20001 (title: "Merge branch 'master' into icon_hasher2")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
Description was changed from ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ========== to ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* R=hanxi, dominickn TBR=dfalcantara (for trivial change to WebApkUpdateManager.java) ==========
The CQ bit was checked by pkotwicz@chromium.org
pkotwicz@chromium.org changed reviewers: + dfalcantara@chromium.org
The CQ bit was unchecked by pkotwicz@chromium.org
The CQ bit was checked by pkotwicz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* R=hanxi, dominickn TBR=dfalcantara (for trivial change to WebApkUpdateManager.java) ========== to ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ==========
dfalcantara@ for WebApkUpdateManager.java (I tried to TBR but it seem to no longer work)
rs lgtm
The CQ bit was checked by pkotwicz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by pkotwicz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by pkotwicz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ========== to ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* ========== to ========== Take Murmur2 hash of untransformed icon when creating WebAPK part 2/2 This CL makes ManifestUpgradeDetectorFetcher take the Murmur2 hash of the bitmap at the icon URL prior to any transformations being applied to the bitmap (such as encoding/decoding the bitmap). The icon hash is used to determine whether the icon that the user sees matches the icon of a WebAPK that the server generated for another user. The icon could be dynamically generated and: - use the same icon URL for all users - be visually different for each user If the hashes match the server can vend the WebAPK that it previously generated to other users. Vending previously generated WebAPKs is faster than creating a new WebAPK for each "create WebAPK" request. BUG=624059 TEST=ManifestUpgradeDetectorFetcherTest.* Committed: https://crrev.com/9190e10d578823e6e353d55cf9f3c436d8dc1099 Cr-Commit-Position: refs/heads/master@{#419182} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/9190e10d578823e6e353d55cf9f3c436d8dc1099 Cr-Commit-Position: refs/heads/master@{#419182} |