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

Issue 2733393003: Split browsing data masks between content and embedder (Closed)

Created:
3 years, 9 months ago by msramek
Modified:
3 years, 9 months ago
CC:
bnc+watch_chromium.org, cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, davemoore+watch_chromium.org, dbeam+watch-settings_chromium.org, dbeam+watch-options_chromium.org, eroman, extensions-reviews_chromium.org, gavinp+prer_chromium.org, harkness+watch_chromium.org, johnme+watch_chromium.org, markusheintz_, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-options_chromium.org, mmenke, msramek+watch_chromium.org, net-reviews_chromium.org, oshima+watch_chromium.org, Peter Beverloo, stevenjb+watch-md-settings_chromium.org, tburkard+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split browsing data masks between content and embedder As a part of the refactoring to move content-related browsing data infrastructure to content, we split BrowsingDataRemover::RemoveDataMask and BrowsingDataHelper::OriginTypeMask between content and embedder. The CL consists of the following steps: 1. BrowsingDataRemover::RemoveDataMask now only contains content datatypes. Chrome-specific datatypes are moved to ChromeBrowsingDataRemoverDelegate. The enum in ChromeBrowsingDataRemoverDelegate also copies all values from BrowsingDataRemover so that this enum inheritance better mimics class inheritance. Note that this is a second attempt at this change, following the discussion in https://codereview.chromium.org/2697123004/ where we tried converting enums into pointers first. The concept of FILTERABLE_DATATYPES has been moved to ChromeBrowsingDataRemoverDelegate, since all content data types are filterable. 2. The same exercise is done for BrowsingDataHelper::OriginTypeMask. Its first two items, UNPROTECTED_WEB and PROTECTED_WEB correspond to the boolean returned by content::SpecialStoragePolicy::IsProtected(). Therefore, they are moved to content as a new enum in BrowsingDataRemover. The third item, EXTENSION, is a Chrome-specific concept and stays in chrome/ code, as a new enum in ChromeBrowsingDataRemoverDelegate. BrowsingDataRemoverImpl is now able to tell about each origin whether it is UNPROTECTED_WEB or PROTECTED_WEB. It delegates the decision what is an EXTENSION to ChromeBrowsingDataRemoverDelegate. A new method has been added to the BrowsingDataRemoverDelegate for this purpose. BrowsingDataHelper now serves no other purpose than recognizing webby and extension URLs for various classes in browsing_data/ and can be eventually deprecated (though doing so in this CL would significantly blow it in size). The behavior of UNPROTECTED_WEB and PROTECTED_WEB is already sufficiently tested in StoragePartition-related tests of BrowsingDataRemoverTest. We just had to replace MockExtensionSpecialStoragePolicy with the regular MockSpecialStoragePolicy. Testcases from BrowsingDataHelperTest have been moved to ChromeBrowsingDataRemoverDelegateTest to cover the remaining EXTENSION type. 3. Since BrowsingDataRemover and ChromeBrowsingDataRemoverDelegate now host both the data type and origin type enums, we changed the naming to call out the difference; all data types are now prefixed with DATA_TYPE, all origin types with ORIGIN_TYPE. 4. All other files contain equivalent replacements. TBR=dbeam@chromium.org,jochen@chromium.org BUG=668114 Review-Url: https://codereview.chromium.org/2733393003 Cr-Commit-Position: refs/heads/master@{#456757} Committed: https://chromium.googlesource.com/chromium/src/+/1c2b3ca05716cc40a8a89f51527b0eef52dddde6

Patch Set 1 #

Patch Set 2 : Some Android and extensions fixes. #

Patch Set 3 : More extension fixes. #

Patch Set 4 : Fix test macros. #

Patch Set 5 : Web apps are Android only. #

Patch Set 6 : Extensions can't match extensions if there are no extensions. #

Total comments: 5

Patch Set 7 : Addressed comments. #

Patch Set 8 : No enum inheritance. #

Patch Set 9 : git cl format #

Patch Set 10 : Rebase (merged automatically) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1245 lines, -1010 lines) Patch
M chrome/browser/android/preferences/pref_service_bridge.cc View 1 2 3 4 5 6 7 8 9 5 chunks +16 lines, -13 lines 0 comments Download
M chrome/browser/android/signin/signin_manager_android.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_helper.h View 2 chunks +8 lines, -17 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_helper.cc View 2 chunks +1 line, -27 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_helper_unittest.cc View 4 chunks +0 lines, -81 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.h View 2 chunks +40 lines, -75 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_browsertest.cc View 1 2 3 4 5 6 7 8 11 chunks +15 lines, -14 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_delegate.h View 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl.h View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl.cc View 1 2 3 4 5 6 7 8 13 chunks +74 lines, -54 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl_unittest.cc View 1 2 3 4 5 6 7 8 36 chunks +276 lines, -291 lines 0 comments Download
M chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h View 1 2 3 4 5 6 7 8 3 chunks +102 lines, -1 line 0 comments Download
M chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc View 1 2 3 4 5 6 7 8 19 chunks +101 lines, -50 lines 0 comments Download
M chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc View 1 2 3 4 5 6 7 8 46 chunks +261 lines, -119 lines 0 comments Download
M chrome/browser/browsing_data/mock_browsing_data_remover.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/mock_browsing_data_remover.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 6 chunks +18 lines, -16 lines 0 comments Download
M chrome/browser/chrome_content_browser_client_unittest.cc View 1 2 3 4 5 6 7 4 chunks +41 lines, -33 lines 0 comments Download
M chrome/browser/chromeos/profiles/profile_helper.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/browsing_data/browsing_data_api.cc View 1 2 3 4 5 6 7 8 10 chunks +43 lines, -38 lines 0 comments Download
M chrome/browser/extensions/api/browsing_data/browsing_data_test.cc View 1 2 3 4 5 6 7 8 9 chunks +133 lines, -117 lines 0 comments Download
M chrome/browser/net/errorpage_browsertest.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/net/predictor_browsertest.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/net/sdch_browsertest.cc View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/profile_resetter/profile_resetter.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/profiles/profiles_state.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/push_messaging/push_messaging_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/clear_browser_data_handler.cc View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -10 lines 0 comments Download

Messages

Total messages: 71 (58 generated)
msramek
Hi Bernhard, Mike, and John! This CL is another attempt at splitting RemoveDataMask between content ...
3 years, 9 months ago (2017-03-08 14:02:22 UTC) #15
Mike West
I skimmed this quickly, and it looks reasonable. That said, I apologize that I'm not ...
3 years, 9 months ago (2017-03-09 08:14:03 UTC) #30
Bernhard Bauer
LGTM! https://codereview.chromium.org/2733393003/diff/140001/chrome/browser/browsing_data/browsing_data_remover_impl.cc File chrome/browser/browsing_data/browsing_data_remover_impl.cc (right): https://codereview.chromium.org/2733393003/diff/140001/chrome/browser/browsing_data/browsing_data_remover_impl.cc#newcode80 chrome/browser/browsing_data/browsing_data_remover_impl.cc:80: // If BrowsingDataRemoverImpl is null, it is not ...
3 years, 9 months ago (2017-03-09 17:35:49 UTC) #39
Mike West
Thanks for the detailed CL description. This LGTM too.
3 years, 9 months ago (2017-03-10 14:06:48 UTC) #40
jam
https://codereview.chromium.org/2733393003/diff/140001/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h File chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h (right): https://codereview.chromium.org/2733393003/diff/140001/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h#newcode56 chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h:56: DATA_TYPE_APP_CACHE = BrowsingDataRemover::DATA_TYPE_APP_CACHE, why do you duplicate the list ...
3 years, 9 months ago (2017-03-10 16:13:43 UTC) #41
msramek
Thanks, Bernhard and Mike! https://codereview.chromium.org/2733393003/diff/140001/chrome/browser/browsing_data/browsing_data_remover_impl.cc File chrome/browser/browsing_data/browsing_data_remover_impl.cc (right): https://codereview.chromium.org/2733393003/diff/140001/chrome/browser/browsing_data/browsing_data_remover_impl.cc#newcode80 chrome/browser/browsing_data/browsing_data_remover_impl.cc:80: // If BrowsingDataRemoverImpl is null, ...
3 years, 9 months ago (2017-03-13 17:57:33 UTC) #45
msramek
John - as explained in the CL description, my intention was to mimic public class ...
3 years, 9 months ago (2017-03-13 17:58:57 UTC) #47
jam
lgtm
3 years, 9 months ago (2017-03-14 16:18:00 UTC) #54
msramek
Thanks, John! \o/ Unlike the previous attempt in https://codereview.chromium.org/2697123004/, this time all the remaining files ...
3 years, 9 months ago (2017-03-14 16:34:24 UTC) #57
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/2733393003/200001
3 years, 9 months ago (2017-03-14 16:35:05 UTC) #60
commit-bot: I haz the power
Failed to apply patch for chrome/browser/push_messaging/push_messaging_browsertest.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-14 16:40:59 UTC) #62
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/2733393003/220001
3 years, 9 months ago (2017-03-14 17:04:53 UTC) #68
commit-bot: I haz the power
3 years, 9 months ago (2017-03-14 17:58:44 UTC) #71
Message was sent while issue was closed.
Committed patchset #10 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/1c2b3ca05716cc40a8a89f51527b...

Powered by Google App Engine
This is Rietveld 408576698