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

Issue 2768883002: Change MockBrowsingDataRemover to MockBrowsingDataRemoverDelegate (Closed)

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

Description

Change MockBrowsingDataRemover to MockBrowsingDataRemoverDelegate BrowsingDataRemover is about to move to content/, and does not expect to be subclassed from the embedder. The responsibility of embedder specialization is now on BrowsingDataRemoverDelegate. Therefore, tests in the embedder should now mock the delegate instead of the remover itself. This CL changes MockBrowsingDataRemover to MockBrowsingDataRemoverDelegate and updates its (currently only one) callsite. Related changes: - Added missing forward declarations to BrowsingDataRemoverDelegate (the code compiled, as its only implementation did have the correct includes) - BrowsingDataRemoverDelegate takes BrowsingDataFilterBuilder through a const ref (not a unique_ptr), therefore we need to make a copy in MockBrowsingDataRemoverDelegate - For consistency, the MockBrowsingDataRemoverDelegate's ExpectCall methods now also take BrowsingDataFilterBuilder as a const ref; this creates an unnecessary copy in the current test, but is a cleaner interface if the class is reused - StoragePartitionHttpCacheDataRemover has been changed to tolerate non-exist URLRequestContextGetter-s (since BrowsingDataRemover now calls it to delete cache even in this test) BUG=668114 Review-Url: https://codereview.chromium.org/2768883002 Cr-Commit-Position: refs/heads/master@{#459121} Committed: https://chromium.googlesource.com/chromium/src/+/2232811f6fb779616100f1c3fed25ebe8f545703

Patch Set 1 : MockDelegate #

Total comments: 2

Patch Set 2 : Fixed the comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -363 lines) Patch
M chrome/browser/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_delegate.h View 1 chunk +6 lines, -0 lines 0 comments Download
D chrome/browser/browsing_data/mock_browsing_data_remover.h View 1 chunk +0 lines, -119 lines 0 comments Download
D chrome/browser/browsing_data/mock_browsing_data_remover.cc View 1 chunk +0 lines, -186 lines 0 comments Download
A chrome/browser/browsing_data/mock_browsing_data_remover_delegate.h View 1 chunk +77 lines, -0 lines 0 comments Download
A chrome/browser/browsing_data/mock_browsing_data_remover_delegate.cc View 1 chunk +96 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client_unittest.cc View 6 chunks +49 lines, -52 lines 0 comments Download
M components/browsing_data/content/storage_partition_http_cache_data_remover.cc View 1 3 chunks +11 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
msramek
Hi Christian, Please have a look! Does this setup work for your future use of ...
3 years, 9 months ago (2017-03-22 18:34:18 UTC) #6
dullweber
On 2017/03/22 18:34:18, msramek wrote: > Hi Christian, > > Please have a look! Does ...
3 years, 9 months ago (2017-03-23 10:09:14 UTC) #10
msramek
Thanks! +Balázs, could you please have a look? Christian already reviewed this feature-wise, but he's ...
3 years, 9 months ago (2017-03-23 10:29:23 UTC) #12
engedy
https://codereview.chromium.org/2768883002/diff/20001/components/browsing_data/content/storage_partition_http_cache_data_remover.cc File components/browsing_data/content/storage_partition_http_cache_data_remover.cc (right): https://codereview.chromium.org/2768883002/diff/20001/components/browsing_data/content/storage_partition_http_cache_data_remover.cc#newcode98 components/browsing_data/content/storage_partition_http_cache_data_remover.cc:98: // --> CacheState::PROCESS_MAIN --> CacheState::CREATE_MEDIA --> nit: Could you ...
3 years, 9 months ago (2017-03-23 15:23:07 UTC) #13
engedy
LGTM % above nit.
3 years, 9 months ago (2017-03-23 15:23:19 UTC) #14
msramek
Thanks! https://codereview.chromium.org/2768883002/diff/20001/components/browsing_data/content/storage_partition_http_cache_data_remover.cc File components/browsing_data/content/storage_partition_http_cache_data_remover.cc (right): https://codereview.chromium.org/2768883002/diff/20001/components/browsing_data/content/storage_partition_http_cache_data_remover.cc#newcode98 components/browsing_data/content/storage_partition_http_cache_data_remover.cc:98: // --> CacheState::PROCESS_MAIN --> CacheState::CREATE_MEDIA --> On 2017/03/23 ...
3 years, 9 months ago (2017-03-23 15:33:02 UTC) #15
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/2768883002/40001
3 years, 9 months ago (2017-03-23 15:33:34 UTC) #18
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 16:51:20 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/2232811f6fb779616100f1c3fed2...

Powered by Google App Engine
This is Rietveld 408576698