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

Issue 2556363003: Refactor cache counting into a separate helper class (Closed)

Created:
4 years ago by dullweber
Modified:
3 years, 11 months ago
Reviewers:
msramek
CC:
chromium-reviews, msramek+watch_chromium.org, gavinp+disk_chromium.org, jam, darin-cc_chromium.org, kinuko+cache_chromium.org, markusheintz_
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor cache counting code as a preparation for a more exact implementation. Move code from StoragePartitionHttpCacheRemover to CacheCountingHelper. Improve tests by adding a CacheTestUtil class for common functionality of cache counting and cache deletion tests. BUG=671196 TBR=achuith@chromium.org Committed: https://crrev.com/75321ac0828dd8f7dd38944234b867ea98598656 Cr-Commit-Position: refs/heads/master@{#441399}

Patch Set 1 #

Patch Set 2 : improve cache counting #

Patch Set 3 : cache counting #

Patch Set 4 : fix chromeos build #

Patch Set 5 : add GetEntrySize() to correctly calculate size for different backends #

Patch Set 6 : add tests #

Patch Set 7 : fix content_unittests #

Patch Set 8 : use Cancel() method instead of timeout #

Patch Set 9 : create browsertest for counting helper #

Patch Set 10 : try fix test #

Patch Set 11 : add cancellation test and hopefully fix windows test failure #

Patch Set 12 : maybe windows is happy now? #

Patch Set 13 : maybe windows is happy now? #

Patch Set 14 : found weakptr issue #

Patch Set 15 : fix another test issue #

Patch Set 16 : cleanup #

Total comments: 37

Patch Set 17 : extract cache_test_util and fixes #

Total comments: 19

Patch Set 18 : fix issues #

Patch Set 19 : rebase #

Patch Set 20 : close entries to avoid memory leak #

Patch Set 21 : close all entries on shutdown #

Patch Set 22 : set upstream and rebase #

Patch Set 23 : Remove code depending on GetEntrySize() #

Patch Set 24 : Remove code depending on GetEntrySize() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+729 lines, -374 lines) Patch
M chrome/browser/browsing_data/browsing_data_counter_utils.cc View 1 1 chunk +5 lines, -10 lines 0 comments Download
M chrome/browser/browsing_data/cache_counter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +28 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/cache_counter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +24 lines, -14 lines 0 comments Download
M chrome/browser/browsing_data/cache_counter_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +14 lines, -4 lines 0 comments Download
A chrome/browser/browsing_data/cache_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/browsing_data/cache_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +146 lines, -0 lines 0 comments Download
A chrome/browser/browsing_data/conditional_cache_counting_helper_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +108 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/conditional_cache_deletion_helper_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +29 lines, -168 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M components/browsing_data/content/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
A components/browsing_data/content/conditional_cache_counting_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +95 lines, -0 lines 0 comments Download
A components/browsing_data/content/conditional_cache_counting_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +172 lines, -0 lines 0 comments Download
M components/browsing_data/content/conditional_cache_deletion_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -3 lines 0 comments Download
M components/browsing_data/content/storage_partition_http_cache_data_remover.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -21 lines 0 comments Download
M components/browsing_data/content/storage_partition_http_cache_data_remover.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +24 lines, -140 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 86 (72 generated)
dullweber
Martin, please have a look at this CL. What do you think is a good ...
4 years ago (2016-12-09 10:43:58 UTC) #22
msramek
On 2016/12/09 10:43:58, dullweber wrote: > Martin, please have a look at this CL. What ...
4 years ago (2016-12-09 13:00:50 UTC) #24
dullweber
On 2016/12/09 13:00:50, msramek wrote: > On 2016/12/09 10:43:58, dullweber wrote: > > Martin, please ...
4 years ago (2016-12-15 14:34:57 UTC) #53
msramek
Very nice! The architecture looks good now; I still have some polishing comments though. https://codereview.chromium.org/2556363003/diff/300001/chrome/browser/browsing_data/cache_counter.cc ...
4 years ago (2016-12-15 15:58:51 UTC) #56
dullweber
Thanks for the comments. I extracted the common methods from the browser_tests into a util ...
4 years ago (2016-12-16 16:41:11 UTC) #59
msramek
Thanks for extracting out the util class, I think it helped the readability of the ...
4 years ago (2016-12-20 01:03:00 UTC) #62
dullweber
Thanks for the comments, I moved GetEntrySize() to http://crrev.com/2591743002 and fixed the other issues as ...
4 years ago (2016-12-21 10:29:20 UTC) #70
msramek
LGTM! Thanks for your patience :) It looks like the base CL https://codereview.chromium.org/2591743002 might take ...
3 years, 11 months ago (2017-01-03 14:44:36 UTC) #73
dullweber
On 2017/01/03 14:44:36, msramek wrote: > LGTM! Thanks for your patience :) > > It ...
3 years, 11 months ago (2017-01-04 12:55:14 UTC) #76
msramek
Still LGTM, thank you! Consider uploading that revert as a CL already so that it ...
3 years, 11 months ago (2017-01-04 14:55:58 UTC) #77
dullweber
On 2017/01/04 14:55:58, msramek wrote: > Still LGTM, thank you! > > Consider uploading that ...
3 years, 11 months ago (2017-01-04 15:23:16 UTC) #79
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/2556363003/460001
3 years, 11 months ago (2017-01-04 15:23:52 UTC) #81
commit-bot: I haz the power
Committed patchset #24 (id:460001)
3 years, 11 months ago (2017-01-04 17:05:53 UTC) #84
commit-bot: I haz the power
3 years, 11 months ago (2017-01-04 17:08:45 UTC) #86
Message was sent while issue was closed.
Patchset 24 (id:??) landed as
https://crrev.com/75321ac0828dd8f7dd38944234b867ea98598656
Cr-Commit-Position: refs/heads/master@{#441399}

Powered by Google App Engine
This is Rietveld 408576698