Chromium Code Reviews
DescriptionChange 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. #Messages
Total messages: 21 (13 generated)
|