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

Issue 2507753003: Do not precache when the cache size is small (Closed)

Created:
4 years, 1 month ago by jamartin
Modified:
4 years ago
Reviewers:
gavinp, rkaplow, twifkak
CC:
chromium-reviews, droger+watchlist_chromium.org, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, jam, darin-cc_chromium.org, wifiprefetch-reviews_google.com
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not precache when the cache size is small BUG=649495 Committed: https://crrev.com/305b67f08c9aca25fc0abdaf4399deb3dd89e2b8 Cr-Commit-Position: refs/heads/master@{#437985}

Patch Set 1 #

Total comments: 23

Patch Set 2 : Use IO thread and report UMA on the cache size #

Total comments: 8

Patch Set 3 : All data member are accessed from the UI thread #

Patch Set 4 : Comment on the IO thread #

Total comments: 2

Patch Set 5 : scoped_refptr #

Total comments: 8

Patch Set 6 : Readability improvements #

Patch Set 7 : Sync'ed to HEAD #

Patch Set 8 : Cannot use WeakPtr across threads #

Patch Set 9 : Forgot dependency on variations #

Patch Set 10 : Wrong dependency name #

Patch Set 11 : Sync'ed to HEAD #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -13 lines) Patch
M components/precache/content/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M components/precache/content/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
M components/precache/content/precache_manager.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +22 lines, -0 lines 0 comments Download
M components/precache/content/precache_manager.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +123 lines, -9 lines 0 comments Download
M components/precache/content/precache_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +82 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 72 (40 generated)
jamartin
4 years, 1 month ago (2016-11-17 03:58:39 UTC) #2
twifkak
https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc#newcode140 components/precache/content/precache_manager.cc:140: OnDone(); Add an UMA for the cache_size_bytes when this ...
4 years, 1 month ago (2016-11-17 21:52:04 UTC) #9
twifkak
https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc#newcode182 components/precache/content/precache_manager.cc:182: base::Unretained(this))); I think you should use AsWeakPtr() instead?
4 years, 1 month ago (2016-11-17 23:15:19 UTC) #10
twifkak
https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc#newcode118 components/precache/content/precache_manager.cc:118: if (net_error_code == net::OK) { Add a DCHECK_CURRENTLY_ON here? ...
4 years, 1 month ago (2016-11-18 00:18:00 UTC) #11
twifkak
https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/1/components/precache/content/precache_manager.cc#newcode168 components/precache/content/precache_manager.cc:168: // Continue with OnGetUnfinishedWorkDone only if the size of ...
4 years, 1 month ago (2016-11-18 01:26:41 UTC) #12
jamartin
Addressed twifkak's comments. Added gavinp@ as reviewer due to the new DEPS on the cache ...
4 years, 1 month ago (2016-11-18 03:55:32 UTC) #15
rkaplow
lgtm new histogram lg
4 years, 1 month ago (2016-11-18 18:49:23 UTC) #16
twifkak
https://codereview.chromium.org/2507753003/diff/20001/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/20001/components/precache/content/precache_manager.cc#newcode123 components/precache/content/precache_manager.cc:123: &PrecacheManager::OnCacheSizeReceived, base::AsWeakPtr(this))); s/base::AsWeakPtr(this)/AsWeakPtr()/. Provided by the SupportsWeakPtr superclass. Ditto ...
4 years, 1 month ago (2016-11-18 20:27:37 UTC) #17
twifkak
https://codereview.chromium.org/2507753003/diff/20001/components/precache/content/precache_manager.h File components/precache/content/precache_manager.h (right): https://codereview.chromium.org/2507753003/diff/20001/components/precache/content/precache_manager.h#newcode222 components/precache/content/precache_manager.h:222: // They are not owned and are reset on ...
4 years, 1 month ago (2016-11-18 23:50:01 UTC) #18
jamartin
Very thorough review. Thank you :-) https://codereview.chromium.org/2507753003/diff/20001/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/20001/components/precache/content/precache_manager.cc#newcode123 components/precache/content/precache_manager.cc:123: &PrecacheManager::OnCacheSizeReceived, base::AsWeakPtr(this))); On ...
4 years, 1 month ago (2016-11-19 02:00:13 UTC) #21
twifkak
lgtm https://codereview.chromium.org/2507753003/diff/60001/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/60001/components/precache/content/precache_manager.cc#newcode227 components/precache/content/precache_manager.cc:227: base::Unretained(url_request_context_getter))); Actually, on further thought, use scoped_refptr<> above ...
4 years, 1 month ago (2016-11-19 02:15:06 UTC) #22
jamartin
Done. Waiting on gavinp@ for the DEP on net. https://codereview.chromium.org/2507753003/diff/60001/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/60001/components/precache/content/precache_manager.cc#newcode227 components/precache/content/precache_manager.cc:227: ...
4 years, 1 month ago (2016-11-19 02:54:22 UTC) #25
gavinp
generally lgtm, but I'm curious about if it's possible not to have an http caching ...
4 years ago (2016-12-08 17:33:47 UTC) #28
jamartin
Thanks for the review. Submitting... https://codereview.chromium.org/2507753003/diff/80001/components/precache/content/precache_manager.cc File components/precache/content/precache_manager.cc (right): https://codereview.chromium.org/2507753003/diff/80001/components/precache/content/precache_manager.cc#newcode134 components/precache/content/precache_manager.cc:134: } else { // ...
4 years ago (2016-12-08 22:43:58 UTC) #29
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/2507753003/100001
4 years ago (2016-12-08 22:45:10 UTC) #32
commit-bot: I haz the power
Failed to apply patch for components/precache/content/precache_manager.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-09 01:01:27 UTC) #34
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/2507753003/120001
4 years ago (2016-12-09 01:16:29 UTC) #37
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/2507753003/140001
4 years ago (2016-12-10 02:54:44 UTC) #41
twifkak
lgtm Explanation for patch set 8: 1. We discovered that this DCHECK-fails because WeakPtr can't ...
4 years ago (2016-12-10 02:58:06 UTC) #42
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/2507753003/160001
4 years ago (2016-12-10 03:05:44 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: android_cronet on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_cronet/builds/50338)
4 years ago (2016-12-10 03:18:24 UTC) #47
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/2507753003/180001
4 years ago (2016-12-10 03:50:53 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/196517)
4 years ago (2016-12-10 05:32:27 UTC) #52
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/2507753003/180001
4 years ago (2016-12-10 06:26:42 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/196538)
4 years ago (2016-12-10 08:06:40 UTC) #56
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/2507753003/180001
4 years ago (2016-12-10 21:11:49 UTC) #58
commit-bot: I haz the power
Failed to apply patch for components/precache/content/precache_manager.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-10 22:38:58 UTC) #60
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/2507753003/200001
4 years ago (2016-12-12 19:29:16 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/197591)
4 years ago (2016-12-12 23:38:26 UTC) #65
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/2507753003/200001
4 years ago (2016-12-13 00:33:06 UTC) #67
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years ago (2016-12-13 02:06:42 UTC) #70
commit-bot: I haz the power
4 years ago (2016-12-13 02:09:06 UTC) #72
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/305b67f08c9aca25fc0abdaf4399deb3dd89e2b8
Cr-Commit-Position: refs/heads/master@{#437985}

Powered by Google App Engine
This is Rietveld 408576698