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

Issue 1304363013: Add a size estimation mechanism to StoragePartitionHttpCacheDataRemover. (Closed)

Created:
5 years, 3 months ago by msramek
Modified:
5 years, 2 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, gavinp+disk_chromium.org, markusheintz_
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a size estimation mechanism to StoragePartitionHttpCacheDataRemover. StoragePartitionHttpCacheDataRemover, the class that enables cache clearing based on time constraints [begin, end), is now able to estimate the size in bytes of entries that would be deleted, without actually deleting them. The actual computation was so far implemented only for the Blockfile cache backend. Simple and Memory backends to be done in follow-up CLs (but the infrastructure is in place, since disk_cache::Backend is purely virtual). Update: I missed Backend V3 and testing subclasses. They were added in Patch 3. Added one browsertest for this functionality. BUG=510028 Committed: https://crrev.com/aee01cebea1d6de51691a6a525ba958184b7a1f6 Cr-Commit-Position: refs/heads/master@{#352830}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Added more tests. #

Total comments: 1

Patch Set 3 : Missing subclasses. #

Total comments: 2

Patch Set 4 : Typo. #

Patch Set 5 : Missed some spots again. #

Total comments: 5

Patch Set 6 : Removed public GetEntrySize #

Total comments: 6

Patch Set 7 : Removed a false comment. #

Patch Set 8 : Rebase (chrome_tests.gypi changed) #

Patch Set 9 : Support null max time. #

Total comments: 4

Patch Set 10 : Small fixes. #

Patch Set 11 : Keep only the unlimited time range. #

Patch Set 12 : Rebase #

Patch Set 13 : Move tests to a lower layer. #

Patch Set 14 : Fixed compilation errors. #

Total comments: 2

Patch Set 15 : static_cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -16 lines) Patch
M components/browsing_data/storage_partition_http_cache_data_remover.h View 1 4 chunks +19 lines, -3 lines 0 comments Download
M components/browsing_data/storage_partition_http_cache_data_remover.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +131 lines, -13 lines 0 comments Download
M content/browser/cache_storage/cache_storage_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M net/disk_cache/backend_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +102 lines, -0 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +14 lines, -0 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl_v3.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl_v3.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M net/disk_cache/blockfile/in_flight_backend_io.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M net/disk_cache/blockfile/in_flight_backend_io.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +14 lines, -0 lines 0 comments Download
M net/disk_cache/disk_cache.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -0 lines 0 comments Download
M net/disk_cache/memory/mem_backend_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/memory/mem_backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M net/http/mock_http_cache.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/http/mock_http_cache.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (10 generated)
msramek
Hi Mike and Gavin, can you please have a look? Thanks, Martin
5 years, 3 months ago (2015-09-01 13:34:33 UTC) #3
Mike West
https://codereview.chromium.org/1304363013/diff/20001/chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc File chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc (right): https://codereview.chromium.org/1304363013/diff/20001/chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc#newcode196 chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc:196: // Write 17 bytes of data to the first ...
5 years, 3 months ago (2015-09-02 11:50:13 UTC) #4
msramek
https://codereview.chromium.org/1304363013/diff/20001/chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc File chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc (right): https://codereview.chromium.org/1304363013/diff/20001/chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc#newcode110 chrome/browser/browsing_data/storage_partition_http_cache_data_remover_browsertest.cc:110: if (value > 0) { Fix: >= 0. Otherwise ...
5 years, 3 months ago (2015-09-02 19:22:25 UTC) #5
Mike West
browsing_data bits LGTM, thanks for taking a second pass. Also, the compilation error looks relevant. ...
5 years, 3 months ago (2015-09-03 08:19:39 UTC) #6
msramek
On 2015/09/03 08:19:39, Mike West (buried) wrote: > browsing_data bits LGTM, thanks for taking a ...
5 years, 3 months ago (2015-09-03 09:12:58 UTC) #7
msramek
Gavin, can you have a look at the rest? Alternatively, please start by confirming whether ...
5 years, 3 months ago (2015-09-03 09:16:29 UTC) #9
jkarlin
Only looked at cache_storage_cache_unittest.cc FYI: gavinp is out of the office for awhile, you'll likely ...
5 years, 3 months ago (2015-09-03 11:05:53 UTC) #10
msramek
Thanks for the info! -Gavin +Egor, Thomas, can you please have a look at the ...
5 years, 3 months ago (2015-09-03 11:22:22 UTC) #12
jkarlin
content/browser/cache_storage/ lgtm
5 years, 3 months ago (2015-09-03 11:36:24 UTC) #13
pasko
sorry for late response. I want to also hear the opinion from rvargas@ about changing ...
5 years, 3 months ago (2015-09-04 14:11:50 UTC) #15
msramek
https://codereview.chromium.org/1304363013/diff/100001/net/disk_cache/disk_cache.h File net/disk_cache/disk_cache.h (right): https://codereview.chromium.org/1304363013/diff/100001/net/disk_cache/disk_cache.h#newcode198 net/disk_cache/disk_cache.h:198: virtual int GetEntrySize() const = 0; On 2015/09/04 14:11:50, ...
5 years, 3 months ago (2015-09-04 16:56:47 UTC) #16
msramek
On 2015/09/04 14:11:50, pasko wrote: > sorry for late response. I want to also hear ...
5 years, 3 months ago (2015-09-04 16:58:01 UTC) #17
pasko
net/disk_cache/simple/ ltgm invoke rvargas@ for net/disk_cache/disk_cache.h https://codereview.chromium.org/1304363013/diff/100001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/1304363013/diff/100001/net/disk_cache/simple/simple_backend_impl.cc#newcode477 net/disk_cache/simple/simple_backend_impl.cc:477: // TODO(msramek): Implement. ...
5 years, 3 months ago (2015-09-08 13:13:49 UTC) #18
Deprecated (see juliatuttle)
Overall approach looks fine; I'd defer to rvargas for the correctness of the implementation for ...
5 years, 3 months ago (2015-09-08 17:44:40 UTC) #19
msramek
https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/blockfile/backend_impl.cc File net/disk_cache/blockfile/backend_impl.cc (right): https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/blockfile/backend_impl.cc#newcode442 net/disk_cache/blockfile/backend_impl.cc:442: DCHECK_GE(end_time, initial_time); On 2015/09/08 17:44:40, ttuttle wrote: > Does ...
5 years, 3 months ago (2015-09-08 18:32:23 UTC) #20
pasko
On 2015/09/08 13:13:49, pasko wrote: > net/disk_cache/simple/ ltgm I meant lgtm, sorry
5 years, 3 months ago (2015-09-09 09:09:07 UTC) #21
pasko
https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/disk_cache.h File net/disk_cache/disk_cache.h (right): https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/disk_cache.h#newcode152 net/disk_cache/disk_cache.h:152: // completes. On 2015/09/08 18:32:22, msramek wrote: > On ...
5 years, 3 months ago (2015-09-09 09:09:29 UTC) #22
msramek
https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/disk_cache.h File net/disk_cache/disk_cache.h (right): https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/disk_cache.h#newcode152 net/disk_cache/disk_cache.h:152: // completes. On 2015/09/09 09:09:29, pasko wrote: > On ...
5 years, 3 months ago (2015-09-09 09:20:42 UTC) #23
pasko
On 2015/09/09 09:20:42, msramek wrote: > https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/disk_cache.h > File net/disk_cache/disk_cache.h (right): > > https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/disk_cache.h#newcode152 > ...
5 years, 3 months ago (2015-09-10 18:40:22 UTC) #24
msramek
On 2015/09/10 18:40:22, pasko wrote: > On 2015/09/09 09:20:42, msramek wrote: > > > https://codereview.chromium.org/1304363013/diff/120001/net/disk_cache/disk_cache.h ...
5 years, 3 months ago (2015-09-10 18:54:48 UTC) #25
rvargas (doing something else)
net looks fine, but we need unit tests. Also, I wonder if you saw my ...
5 years, 3 months ago (2015-09-12 00:13:02 UTC) #26
rvargas (doing something else)
On 2015/09/10 18:54:48, msramek wrote: > On 2015/09/10 18:40:22, pasko wrote: > > On 2015/09/09 ...
5 years, 3 months ago (2015-09-12 00:24:03 UTC) #27
msramek
Well, I agree that it makes sense to start with a simpler implementation and add ...
5 years, 3 months ago (2015-09-15 11:42:36 UTC) #28
rvargas (doing something else)
On 2015/09/15 11:42:36, msramek wrote: > Well, I agree that it makes sense to start ...
5 years, 3 months ago (2015-09-15 19:04:13 UTC) #29
pasko
On 2015/09/15 19:04:13, rvargas (slow to respond) wrote: > On 2015/09/15 11:42:36, msramek wrote: > ...
5 years, 3 months ago (2015-09-15 19:22:38 UTC) #30
msramek
(sorry for the delay, I was OOO a few days) Thanks for your patience, guys, ...
5 years, 3 months ago (2015-09-23 13:38:12 UTC) #32
msramek
> > are concerned about BrowsingDataRemover already complicating the code by > > unnecessary API, ...
5 years, 3 months ago (2015-09-23 13:39:52 UTC) #33
rvargas (doing something else)
On 2015/09/23 13:38:12, msramek wrote: > (sorry for the delay, I was OOO a few ...
5 years, 3 months ago (2015-09-24 00:14:45 UTC) #34
pasko
New design and current changes in net/disk_cache/simple/ ltgm thanks for making future reading simpler! When ...
5 years, 2 months ago (2015-09-25 11:47:40 UTC) #35
msramek
Eh, it again took me a while to get back to this CL... Thanks for ...
5 years, 2 months ago (2015-09-29 09:53:42 UTC) #36
rvargas (doing something else)
PS 11 lgtm modulo nit. https://codereview.chromium.org/1304363013/diff/300001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/1304363013/diff/300001/net/disk_cache/backend_unittest.cc#newcode1741 net/disk_cache/backend_unittest.cc:1741: EXPECT_EQ(result + last_entry_size + ...
5 years, 2 months ago (2015-09-30 17:04:42 UTC) #37
pasko
should this be in CQ already? :)
5 years, 2 months ago (2015-10-02 09:48:42 UTC) #38
msramek
Yes, it should! I was on an offsite :) https://codereview.chromium.org/1304363013/diff/300001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/1304363013/diff/300001/net/disk_cache/backend_unittest.cc#newcode1741 net/disk_cache/backend_unittest.cc:1741: ...
5 years, 2 months ago (2015-10-06 10:55:29 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304363013/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304363013/320001
5 years, 2 months ago (2015-10-06 10:55:57 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/107047)
5 years, 2 months ago (2015-10-06 11:06:16 UTC) #44
msramek
Oh, I see that rvargas@ removed himself from OWNERS in the meantime. ttuttle@, could you ...
5 years, 2 months ago (2015-10-06 11:17:42 UTC) #45
Deprecated (see juliatuttle)
On 2015/10/06 11:17:42, msramek wrote: > Oh, I see that rvargas@ removed himself from OWNERS ...
5 years, 2 months ago (2015-10-07 12:18:55 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304363013/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304363013/320001
5 years, 2 months ago (2015-10-07 12:22:50 UTC) #48
commit-bot: I haz the power
Committed patchset #15 (id:320001)
5 years, 2 months ago (2015-10-07 14:23:43 UTC) #49
commit-bot: I haz the power
5 years, 2 months ago (2015-10-07 14:25:00 UTC) #50
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/aee01cebea1d6de51691a6a525ba958184b7a1f6
Cr-Commit-Position: refs/heads/master@{#352830}

Powered by Google App Engine
This is Rietveld 408576698