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

Issue 2647683002: Consolidate Origin- and RegistrableDomain- FilterBuilder into one class (Closed)

Created:
3 years, 11 months ago by msramek
Modified:
3 years, 11 months ago
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Consolidate Origin- and RegistrableDomain- FilterBuilder into one class ...called BrowsingDataFilterBuilderImpl. The new class will eventually live in content/ (together with BrowsingDataRemoverImpl) but will also be used by chrome/, therefore we also create an abstract interface BrowsingDataFilterBuilder. We also consolidate the tests into one file. As the new class is theoretically able to handle origins and registrable domains at the same time, we add new tests for these cases (although this situation does not occur in production). The previous state with two different classes increased the complexity in ChromeContentBrowserClientTest, which we now simplified. We also introduced a Copy() method to the new class which allowed us to duplicate the filter builder in BrowsingDataRemoverImplTest and ChromeBrowsingDataRemoverDelegateTest where needed, which means we no longer rely on passing the class via reference, thus we don't need to use the private BrowsingDataRemoverImpl::RemoveInternal method, and therefore we could remove friend declarations from BrowsingDataRemoverImpl. As a side effect, calling the public methods now means that checks for filterable datatypes are performed, and since HISTORY and PASSWORDS are not yet marked as filterable, we had to disable the corresponding tests. TBR=bauerb@chromium.org BUG=668114 Review-Url: https://codereview.chromium.org/2647683002 Cr-Commit-Position: refs/heads/master@{#445706} Committed: https://chromium.googlesource.com/chromium/src/+/c7ee9d5e15a8d98d5f5fe2afcff74bec2f3ae7d6

Patch Set 1 #

Patch Set 2 : Fix compilation. #

Patch Set 3 : Fix a test #

Patch Set 4 : Actually fix the test. #

Patch Set 5 : Fix memory leak. #

Total comments: 10

Patch Set 6 : Addressed comments. #

Patch Set 7 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+596 lines, -1112 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/android/preferences/pref_service_bridge.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_filter_builder.h View 1 2 3 4 4 chunks +36 lines, -22 lines 0 comments Download
D chrome/browser/browsing_data/browsing_data_filter_builder.cc View 1 chunk +0 lines, -34 lines 0 comments Download
A chrome/browser/browsing_data/browsing_data_filter_builder_impl.h View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/browsing_data/browsing_data_filter_builder_impl.cc View 1 1 chunk +216 lines, -0 lines 0 comments Download
A + chrome/browser/browsing_data/browsing_data_filter_builder_impl_unittest.cc View 1 2 3 4 5 11 chunks +144 lines, -27 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_browsertest.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl.h View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl.cc View 4 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl_unittest.cc View 1 2 3 4 5 6 11 chunks +41 lines, -41 lines 0 comments Download
M chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc View 1 2 3 4 5 6 15 chunks +81 lines, -68 lines 0 comments Download
D chrome/browser/browsing_data/origin_filter_builder.h View 1 chunk +0 lines, -76 lines 0 comments Download
D chrome/browser/browsing_data/origin_filter_builder.cc View 1 chunk +0 lines, -81 lines 0 comments Download
D chrome/browser/browsing_data/registrable_domain_filter_builder.h View 1 chunk +0 lines, -98 lines 0 comments Download
D chrome/browser/browsing_data/registrable_domain_filter_builder.cc View 1 chunk +0 lines, -144 lines 0 comments Download
D chrome/browser/browsing_data/registrable_domain_filter_builder_unittest.cc View 1 chunk +0 lines, -429 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/chrome_content_browser_client_unittest.cc View 1 2 3 4 5 10 chunks +14 lines, -57 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 44 (37 generated)
msramek
Hi Mike, Please have a look! This is based on https://codereview.chromium.org/2641853002/ which I sent to ...
3 years, 11 months ago (2017-01-19 16:15:52 UTC) #7
Mike West
LGTM % some questions about the tests (sorry; I added comments a few days ago ...
3 years, 11 months ago (2017-01-24 08:37:27 UTC) #26
msramek
Addressed your comments and rebased. Thanks, Mike, especially for catching those bogus tests :) https://codereview.chromium.org/2647683002/diff/100001/chrome/browser/browsing_data/browsing_data_filter_builder_impl_unittest.cc ...
3 years, 11 months ago (2017-01-24 11:52:31 UTC) #34
msramek
Adding +Bernhard to TBR for pref_service_bridge.cc, since the change there is mechanical; and proceeding to ...
3 years, 11 months ago (2017-01-24 11:55:33 UTC) #37
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/2647683002/160001
3 years, 11 months ago (2017-01-24 11:56:24 UTC) #40
Bernhard Bauer
lgtm
3 years, 11 months ago (2017-01-24 11:59:21 UTC) #41
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 12:01:42 UTC) #44
Message was sent while issue was closed.
Committed patchset #7 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/c7ee9d5e15a8d98d5f5fe2afcff7...

Powered by Google App Engine
This is Rietveld 408576698