|
Convert RemoveDataMask from enum to pointers and split it between content and embedder
As the next step of the migration of browsing_data codebase
to content, we need to split RemoveDataMask into platform
datatypes (defined in content/) and Chrome-specific datatypes
(defined in chrome/).
The datatypes from BrowsingDataRemover::RemoveDataMask are now
represented as global static objects of the BrowsingDataType
type; BrowsingDataRemover and related classes use their
addresses (const BrowsingDataType*) to distinguish them.
To pass a mask consisting of multiple datatypes, we use
std::set<const BrowsingDataType*>.
See the design doc for more details why this approach was
chosen:
https://docs.google.com/document/d/1I6m4QwbTNhG6wdtazamhTnArJN-UMUGqpvwH6InBEaM/
Details (a.k.a. how to review this CL):
1. Platform datatypes are defined in the content namespace
in the file content/public/browsing_data_types.[h|cc].
2. Chrome datatypes are defined in the default namespace in
the file c/b/browsing_data/chrome_browsing_data_types.[h|cc];
this file also imports the platform datatypes to the
default namespace, since embedder callsites should not
have to know where a datatype originates.
3. The rest of the CL consists mostly of equivalent replacements;
this is largely possible thanks to C++11 initializers
allowing syntax such as std::set<X> x = { x1, x2, x3 };
to replace what was previously enum bitmask "x1 | x2 | x3";
bitmasks bitwise operations are more complicated to replace;
there, we use set operations from the <algorithm> library.
4. The filterability of a datatype is now defined as an
attribute of the BrowsingDataType object.
5. Other nonequivalent changes suggested in the above doc,
such as the introduction of a "storage" concept in place
of "site data" are not a part of this CL.
BUG= 668114
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1150 lines, -921 lines) |
Patch |
|
M |
chrome/browser/BUILD.gn
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/android/preferences/pref_service_bridge.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
6 chunks |
+24 lines, -13 lines |
0 comments
|
Download
|
|
M |
chrome/browser/android/signin/signin_manager_android.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/browsing_data/browsing_data_remover.h
|
View
|
1
2
3
4
5
6
7
|
6 chunks |
+19 lines, -94 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 |
+17 lines, -16 lines |
0 comments
|
Download
|
|
M |
chrome/browser/browsing_data/browsing_data_remover_delegate.h
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/browsing_data/browsing_data_remover_impl.h
|
View
|
1
2
3
4
5
|
7 chunks |
+16 lines, -14 lines |
0 comments
|
Download
|
|
M |
chrome/browser/browsing_data/browsing_data_remover_impl.cc
|
View
|
1
2
3
4
5
|
19 chunks |
+56 lines, -34 lines |
0 comments
|
Download
|
|
M |
chrome/browser/browsing_data/browsing_data_remover_impl_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
34 chunks |
+135 lines, -262 lines |
0 comments
|
Download
|
|
M |
chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
|
View
|
1
2
3
4
5
6
7
|
18 chunks |
+41 lines, -37 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
|
50 chunks |
+81 lines, -83 lines |
0 comments
|
Download
|
|
A |
chrome/browser/browsing_data/chrome_browsing_data_types.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+75 lines, -0 lines |
0 comments
|
Download
|
|
A |
chrome/browser/browsing_data/chrome_browsing_data_types.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+115 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chrome_content_browser_client.cc
|
View
|
1
2
3
4
5
6
7
8
|
4 chunks |
+17 lines, -16 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chrome_content_browser_client_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
|
10 chunks |
+85 lines, -60 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/profiles/profile_helper.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/browsing_data/browsing_data_api.h
|
View
|
|
19 chunks |
+25 lines, -17 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/browsing_data/browsing_data_api.cc
|
View
|
1
2
3
4
5
|
8 chunks |
+82 lines, -56 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/browsing_data/browsing_data_test.cc
|
View
|
1
2
3
4
5
6
7
8
|
13 chunks |
+190 lines, -156 lines |
0 comments
|
Download
|
|
M |
chrome/browser/net/errorpage_browsertest.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/net/predictor_browsertest.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/net/sdch_browsertest.cc
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/prerender/prerender_browsertest.cc
|
View
|
1
2
3
4
5
6
7
|
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
8
|
3 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/profiles/profiles_state.cc
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/push_messaging/push_messaging_browsertest.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/browser_commands.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
View
|
1
2
3
4
5
6
7
|
3 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
|
3 chunks |
+17 lines, -14 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
|
3 chunks |
+18 lines, -14 lines |
0 comments
|
Download
|
|
M |
content/browser/BUILD.gn
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
A |
content/browser/browsing_data/browsing_data_types.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+36 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/public/browser/BUILD.gn
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
A |
content/public/browser/browsing_data_types.h
|
View
|
|
1 chunk |
+41 lines, -0 lines |
0 comments
|
Download
|
Total messages: 56 (42 generated)
|