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

Issue 2757923002: Move StoragePartitionHttpCacheDataRemover to content/ (Closed)

Created:
3 years, 9 months ago by msramek
Modified:
3 years, 9 months ago
Reviewers:
Mike West, jam
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, extensions-reviews_chromium.org, gavinp+disk_chromium.org, markusheintz_, msramek+watch_chromium.org, wjmaclean
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move StoragePartitionHttpCacheDataRemover to content/ StoragePartitionHttpCacheDataRemover is used to delete the contents of a cache obtained from a given StoragePartition. There are three callsites: BrowsingDataRemover (which will soon move to content/), CacheCounter (chrome/) and WebViewGuest (in extensions/). The original plan was that StoragePartitionHttpCacheDataRemover would move to content together with BrowsingDataRemover, and the latter two callsites would then request cache deletion using a DATA_TYPE_CACHE request to BrowsingDataRemover rather than StoragePartitionHttpCacheDataRemover. However, this is not possible, as WebViewGuest requests a deletion for a particular non-default StoragePartition (unlike BrowsingDataRemover, which uses BrowserContext::GetDefaultStoragePartition()). Therefore, we move StoragePartitionHttpCacheDataRemover to content/ first and expose it in the content/public interface through StoragePartition::ClearHttpAndMediaCaches(). Together with it, we move the ConditionalCacheDeletionHelper class (which is only used by the former for conditional deletions and can eventually be folded into it). Additionally, we move the class' browsertest which also necessitates the move of CacheTestUtil to content/public/test. This can be eventually folded into BrowsingDataRemover's test utils once BrowsingDataRemover into content/, since browsing_data/ tests are the only users of these utils. BUG=668114 Review-Url: https://codereview.chromium.org/2757923002 Cr-Commit-Position: refs/heads/master@{#459851} Committed: https://chromium.googlesource.com/chromium/src/+/ee2be6e582be6b73f96eb7caf150e57fb1817dc4

Patch Set 1 #

Patch Set 2 : git cl format #

Total comments: 1

Patch Set 3 : Add a method to StoragePartition #

Patch Set 4 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -977 lines) Patch
M chrome/browser/browsing_data/browsing_data_remover_impl.cc View 1 2 3 3 chunks +13 lines, -22 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl_unittest.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/cache_counter_browsertest.cc View 1 2 2 chunks +4 lines, -7 lines 0 comments Download
D chrome/browser/browsing_data/cache_test_util.h View 1 chunk +0 lines, -60 lines 0 comments Download
D chrome/browser/browsing_data/cache_test_util.cc View 1 chunk +0 lines, -147 lines 0 comments Download
M chrome/browser/browsing_data/conditional_cache_counting_helper_browsertest.cc View 3 chunks +4 lines, -4 lines 0 comments Download
D chrome/browser/browsing_data/conditional_cache_deletion_helper_browsertest.cc View 1 chunk +0 lines, -180 lines 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M components/browsing_data/content/BUILD.gn View 1 chunk +0 lines, -4 lines 0 comments Download
D components/browsing_data/content/conditional_cache_deletion_helper.h View 1 chunk +0 lines, -73 lines 0 comments Download
D components/browsing_data/content/conditional_cache_deletion_helper.cc View 1 chunk +0 lines, -96 lines 0 comments Download
D components/browsing_data/content/storage_partition_http_cache_data_remover.h View 1 chunk +0 lines, -101 lines 0 comments Download
D components/browsing_data/content/storage_partition_http_cache_data_remover.cc View 1 2 3 1 chunk +0 lines, -201 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A + content/browser/browsing_data/conditional_cache_deletion_helper.h View 3 chunks +7 lines, -6 lines 0 comments Download
A + content/browser/browsing_data/conditional_cache_deletion_helper.cc View 1 5 chunks +13 lines, -16 lines 0 comments Download
A + content/browser/browsing_data/conditional_cache_deletion_helper_browsertest.cc View 1 5 chunks +12 lines, -13 lines 0 comments Download
A + content/browser/browsing_data/storage_partition_http_cache_data_remover.h View 1 2 4 chunks +7 lines, -9 lines 0 comments Download
A + content/browser/browsing_data/storage_partition_http_cache_data_remover.cc View 1 2 3 7 chunks +20 lines, -25 lines 0 comments Download
M content/browser/storage_partition_impl.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/storage_partition_impl.cc View 1 2 3 2 chunks +17 lines, -0 lines 0 comments Download
M content/public/browser/storage_partition.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
A + content/public/test/cache_test_util.h View 2 chunks +3 lines, -1 line 0 comments Download
A + content/public/test/cache_test_util.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 2 2 chunks +3 lines, -6 lines 0 comments Download

Messages

Total messages: 28 (17 generated)
msramek
Hi Mike and John, Please have a look! We were planning to move StoragePartitionHttpCacheDataRemover to ...
3 years, 9 months ago (2017-03-17 18:57:53 UTC) #4
Mike West
https://codereview.chromium.org/2757923002/diff/20001/content/public/browser/storage_partition_http_cache_data_remover.h File content/public/browser/storage_partition_http_cache_data_remover.h (right): https://codereview.chromium.org/2757923002/diff/20001/content/public/browser/storage_partition_http_cache_data_remover.h#newcode18 content/public/browser/storage_partition_http_cache_data_remover.h:18: class CONTENT_EXPORT StoragePartitionHttpCacheDataRemover { Adding this to //content/public seems ...
3 years, 9 months ago (2017-03-20 11:03:37 UTC) #7
jam
Did you consider having DataRemover take in a StoragePartition instead?
3 years, 9 months ago (2017-03-20 17:17:27 UTC) #8
msramek
Thanks for the suggestions! I thought about the various options a bit, and here's what ...
3 years, 9 months ago (2017-03-22 19:52:11 UTC) #14
jam
On 2017/03/22 19:52:11, msramek wrote: > Thanks for the suggestions! > > I thought about ...
3 years, 9 months ago (2017-03-23 00:32:07 UTC) #17
msramek
Ah, right... Yes, I think it's reasonable to think of BrowsingDataRemover as some kind of ...
3 years, 9 months ago (2017-03-23 19:06:52 UTC) #18
Mike West
The approach in patchset #3 seems reasonable to me. Is it something you can live ...
3 years, 9 months ago (2017-03-25 08:45:41 UTC) #19
jam
thanks for the explanation, lgtm
3 years, 9 months ago (2017-03-27 16:44:46 UTC) #20
msramek
Thanks both! I updated the CL description to mention that we're going through StoragePartition, and ...
3 years, 9 months ago (2017-03-27 17:58:39 UTC) #22
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/2757923002/80001
3 years, 9 months ago (2017-03-27 17:59:50 UTC) #25
commit-bot: I haz the power
3 years, 9 months ago (2017-03-27 19:28:57 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/ee2be6e582be6b73f96eb7caf150...

Powered by Google App Engine
This is Rietveld 408576698