Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Issue 2771793003: Move timeout timer into WebApkIconHasher (Closed)

Created:
3 years, 9 months ago by F
Modified:
3 years, 8 months ago
Reviewers:
dominickn
CC:
chromium-reviews, zpeng+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move timeout timer into WebApkIconHasher This CL adds a timer to WebApkIconHasher. Consequently, classes that invoke WebApkIconHasher::DownloadAndComputeMurmur2Hash no longer need to maintain a timer dedicated to WebApkIconHasher. This CL also simplifies the error checking and handling logic. WebApkIconHasher now checks for URL validity itself, and would return an empty hash string for any errors encountered. BUG=649771 Review-Url: https://codereview.chromium.org/2771793003 Cr-Commit-Position: refs/heads/master@{#460508} Committed: https://chromium.googlesource.com/chromium/src/+/477d57e0cb3d510ac379ed3c525741379cd39193

Patch Set 1 : Move timeout timer into WebApkIconHasher #

Total comments: 16

Patch Set 2 : Hasher addressing comments and adding tests #

Total comments: 6

Patch Set 3 : Remove weakptr and use unretained #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -46 lines) Patch
M chrome/browser/android/webapk/webapk_icon_hasher.h View 1 2 1 chunk +23 lines, -13 lines 0 comments Download
M chrome/browser/android/webapk/webapk_icon_hasher.cc View 1 2 3 chunks +37 lines, -12 lines 0 comments Download
M chrome/browser/android/webapk/webapk_icon_hasher_unittest.cc View 1 2 chunks +16 lines, -3 lines 0 comments Download
M chrome/browser/android/webapk/webapk_installer.cc View 1 chunk +3 lines, -15 lines 0 comments Download
M chrome/browser/android/webapk/webapk_update_data_fetcher.cc View 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 36 (28 generated)
F
Hi Dominick, PTAL. Thanks! If you think that this idea is okay, I'm going to ...
3 years, 9 months ago (2017-03-24 02:22:39 UTC) #8
dominickn
https://codereview.chromium.org/2771793003/diff/20001/chrome/browser/android/webapk/webapk_icon_hasher.cc File chrome/browser/android/webapk/webapk_icon_hasher.cc (right): https://codereview.chromium.org/2771793003/diff/20001/chrome/browser/android/webapk/webapk_icon_hasher.cc#newcode67 chrome/browser/android/webapk/webapk_icon_hasher.cc:67: FROM_HERE, base::TimeDelta::FromMilliseconds(60000), Can you put this constant in the ...
3 years, 9 months ago (2017-03-24 02:41:01 UTC) #9
dominickn
Also, a slightly longer description never goes astray - the commit log is an important ...
3 years, 9 months ago (2017-03-24 02:43:11 UTC) #10
F
Thanks Dominick! PTAL I've added the CL description and additional tests. https://codereview.chromium.org/2771793003/diff/20001/chrome/browser/android/webapk/webapk_icon_hasher.cc File chrome/browser/android/webapk/webapk_icon_hasher.cc (right): ...
3 years, 9 months ago (2017-03-27 20:37:09 UTC) #19
dominickn
lgtm % nits https://codereview.chromium.org/2771793003/diff/40001/chrome/browser/android/webapk/webapk_icon_hasher.cc File chrome/browser/android/webapk/webapk_icon_hasher.cc (right): https://codereview.chromium.org/2771793003/diff/40001/chrome/browser/android/webapk/webapk_icon_hasher.cc#newcode38 chrome/browser/android/webapk/webapk_icon_hasher.cc:38: net::URLRequestContextGetter* url_request_context_getter, It looks like everywhere ...
3 years, 9 months ago (2017-03-27 23:27:34 UTC) #20
F
Thanks Dominick! I'm going to submit it soon. https://codereview.chromium.org/2771793003/diff/40001/chrome/browser/android/webapk/webapk_icon_hasher.cc File chrome/browser/android/webapk/webapk_icon_hasher.cc (right): https://codereview.chromium.org/2771793003/diff/40001/chrome/browser/android/webapk/webapk_icon_hasher.cc#newcode38 chrome/browser/android/webapk/webapk_icon_hasher.cc:38: net::URLRequestContextGetter* ...
3 years, 8 months ago (2017-03-29 20:00:49 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2771793003/80001
3 years, 8 months ago (2017-03-29 20:01:01 UTC) #33
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 20:08:45 UTC) #36
Message was sent while issue was closed.
Committed patchset #3 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/477d57e0cb3d510ac379ed3c5257...

Powered by Google App Engine
This is Rietveld 408576698