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 114223002: Multi-strategy based tracking. (Closed)

Created:
7 years ago by gab
Modified:
6 years, 10 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Multi-strategy based tracking. Introducing "split preferences" which allow tracking of preferences on a per item level rather than "atomic preferences" which are tracked as a whole. BUG=329078 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248393

Patch Set 1 : #

Patch Set 2 : . #

Total comments: 20

Patch Set 3 : review:erik #

Total comments: 8

Patch Set 4 : review:asvitkine #

Total comments: 10

Patch Set 5 : review:asvitkine 2 #

Total comments: 8

Patch Set 6 : review:asvitkine 3 #

Patch Set 7 : comment nit #

Patch Set 8 : UNKNOWN_VALUE when going from atomic to split hash for an existing tracked pref #

Total comments: 14

Patch Set 9 : review:erikwright #

Patch Set 10 : merge up to r243093 #

Patch Set 11 : post merge fixups #

Patch Set 12 : Declare MIGRATED invalid in Release builds (as opposed to only NOTREACHED() in Debug builds) #

Patch Set 13 : adapt tests post merge #

Patch Set 14 : fix compile? #

Patch Set 15 : nits #

Patch Set 16 : dont use std::map::operator[] #

Patch Set 17 : fix clang compile #

Patch Set 18 : merge to 243928 and better tests #

Patch Set 19 : nit #

Patch Set 20 : nits #

Total comments: 8

Patch Set 21 : TrackedPreference class #

Patch Set 22 : move EnforcementLevel enum to TrackedPreference class #

Patch Set 23 : +comments #

Patch Set 24 : nit #

Patch Set 25 : merge up to r244887 #

Patch Set 26 : fix clang compile? #

Total comments: 23

Patch Set 27 : fix clang compile 2? #

Patch Set 28 : fix clang compile 3? #

Patch Set 29 : review:erikwright #

Patch Set 30 : fix clang compile 4? #

Patch Set 31 : review:robertshield #

Patch Set 32 : TrackedPreferenceHelper #

Patch Set 33 : Use base::ScopedPtrHashMap #

Total comments: 16

Patch Set 34 : nits #

Patch Set 35 : move new files to c/b/p/tracked #

Patch Set 36 : review:erikwright #

Patch Set 37 : cleanup #

Patch Set 38 : merge up to r245932 #

Patch Set 39 : fix compile #

Total comments: 14

Patch Set 40 : merge up to r245932 (FilterSerializeData) #

Patch Set 41 : include-what-you-use #

Patch Set 42 : merge up to r247271 #

Patch Set 43 : merge up to r247699 #

Patch Set 44 : const-ownership model rename TrackedPref::OnValueChanged() => TrackedPref::OnNewValue() to re-use in Init case #

Total comments: 4

Patch Set 45 : nit: fix init order #

Patch Set 46 : merge up to r248367 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1323 lines, -282 lines) Patch
M chrome/browser/prefs/chrome_pref_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +61 lines, -15 lines 0 comments Download
M chrome/browser/prefs/pref_hash_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 4 chunks +30 lines, -16 lines 0 comments Download
M chrome/browser/prefs/pref_hash_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 5 chunks +53 lines, -113 lines 0 comments Download
M chrome/browser/prefs/pref_hash_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 12 chunks +384 lines, -119 lines 0 comments Download
M chrome/browser/prefs/pref_hash_store.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/prefs/pref_hash_store_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +30 lines, -2 lines 0 comments Download
M chrome/browser/prefs/pref_hash_store_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +119 lines, -11 lines 0 comments Download
M chrome/browser/prefs/pref_hash_store_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +197 lines, -2 lines 0 comments Download
A chrome/browser/prefs/tracked/tracked_atomic_preference.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/prefs/tracked/tracked_atomic_preference.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/browser/prefs/tracked/tracked_preference.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/prefs/tracked/tracked_preference_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 chunk +64 lines, -0 lines 0 comments Download
A chrome/browser/prefs/tracked/tracked_preference_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +106 lines, -0 lines 0 comments Download
A chrome/browser/prefs/tracked/tracked_split_preference.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/prefs/tracked/tracked_split_preference.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 1 chunk +75 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 2 chunks +9 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
gab
Erik, PTAL at everything. Alexei, PTAL at histograms. Thanks! Gab
7 years ago (2013-12-17 01:10:07 UTC) #1
erikwright (departed)
https://codereview.chromium.org/114223002/diff/80001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/80001/chrome/browser/prefs/pref_hash_filter.cc#newcode67 chrome/browser/prefs/pref_hash_filter.cc:67: { prefs::kShowHomeButton, TRACKING_STRATEGY_ATOMIC }, Suggestion: Make the 'reporting id' ...
7 years ago (2013-12-17 02:22:49 UTC) #2
gab
Thanks, PTAL. https://codereview.chromium.org/114223002/diff/80001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/80001/chrome/browser/prefs/pref_hash_filter.cc#newcode67 chrome/browser/prefs/pref_hash_filter.cc:67: { prefs::kShowHomeButton, TRACKING_STRATEGY_ATOMIC }, On 2013/12/17 02:22:50, ...
7 years ago (2013-12-17 18:08:05 UTC) #3
Alexei Svitkine (slow)
https://codereview.chromium.org/114223002/diff/100001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/100001/chrome/browser/prefs/pref_hash_filter.cc#newcode44 chrome/browser/prefs/pref_hash_filter.cc:44: // static blocks which aren't compatible with dynamically generated ...
7 years ago (2013-12-17 18:26:24 UTC) #4
gab
Alexei/Erik, PTAL. Thanks! Gab https://codereview.chromium.org/114223002/diff/100001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/100001/chrome/browser/prefs/pref_hash_filter.cc#newcode44 chrome/browser/prefs/pref_hash_filter.cc:44: // static blocks which aren't ...
7 years ago (2013-12-17 22:08:08 UTC) #5
Alexei Svitkine (slow)
https://codereview.chromium.org/114223002/diff/120001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/120001/chrome/browser/prefs/pref_hash_filter.cc#newcode42 chrome/browser/prefs/pref_hash_filter.cc:42: void ReportSplitPreferenceChangedCount(const std::string& path, Add a comment. Mention that ...
7 years ago (2013-12-17 22:19:55 UTC) #6
gab
Thanks, PTAL. https://codereview.chromium.org/114223002/diff/120001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/120001/chrome/browser/prefs/pref_hash_filter.cc#newcode42 chrome/browser/prefs/pref_hash_filter.cc:42: void ReportSplitPreferenceChangedCount(const std::string& path, On 2013/12/17 22:19:56, ...
7 years ago (2013-12-18 17:43:14 UTC) #7
Alexei Svitkine (slow)
https://codereview.chromium.org/114223002/diff/120001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/114223002/diff/120001/tools/metrics/histograms/histograms.xml#newcode32978 tools/metrics/histograms/histograms.xml:32978: + <affected-histogram name="Settings.TrackedSplitPreferenceChangedCount"/> On 2013/12/18 17:43:14, gab wrote: > ...
7 years ago (2013-12-18 18:28:01 UTC) #8
gab
PTAL. https://codereview.chromium.org/114223002/diff/120001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/114223002/diff/120001/tools/metrics/histograms/histograms.xml#newcode32978 tools/metrics/histograms/histograms.xml:32978: + <affected-histogram name="Settings.TrackedSplitPreferenceChangedCount"/> On 2013/12/18 18:28:01, Alexei Svitkine ...
7 years ago (2013-12-18 18:48:02 UTC) #9
Alexei Svitkine (slow)
histograms LGTM % nit. I'll let Erik review the broader code structure and tests. https://codereview.chromium.org/114223002/diff/140001/chrome/browser/prefs/pref_hash_filter.h ...
7 years ago (2013-12-18 20:02:09 UTC) #10
gab
Thanks, Erik all yours. https://codereview.chromium.org/114223002/diff/140001/chrome/browser/prefs/pref_hash_filter.h File chrome/browser/prefs/pref_hash_filter.h (right): https://codereview.chromium.org/114223002/diff/140001/chrome/browser/prefs/pref_hash_filter.h#newcode31 chrome/browser/prefs/pref_hash_filter.h:31: // tracked independently. On 2013/12/18 ...
7 years ago (2013-12-18 20:15:43 UTC) #11
erikwright (departed)
https://codereview.chromium.org/114223002/diff/220001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/220001/chrome/browser/prefs/pref_hash_filter.cc#newcode177 chrome/browser/prefs/pref_hash_filter.cc:177: ReportSplitPreferenceChangedCount(path, invalid_keys.size()); It's a little surprising that this "Report" ...
7 years ago (2013-12-19 15:21:26 UTC) #12
gab
Thanks, PTAL. https://codereview.chromium.org/114223002/diff/220001/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/220001/chrome/browser/prefs/pref_hash_filter.cc#newcode177 chrome/browser/prefs/pref_hash_filter.cc:177: ReportSplitPreferenceChangedCount(path, invalid_keys.size()); On 2013/12/19 15:21:28, erikwright wrote: ...
7 years ago (2013-12-20 18:37:06 UTC) #13
gab
Erik, rebased this on top of other changes I decided to get in first, PTAL. ...
6 years, 11 months ago (2014-01-08 01:53:30 UTC) #14
gab
Erik, merged on top of hash_of_hashes; PTAL. Cheers! Gab
6 years, 11 months ago (2014-01-13 18:53:44 UTC) #15
erikwright (departed)
https://codereview.chromium.org/114223002/diff/1220002/chrome/browser/prefs/pref_hash_filter.cc File chrome/browser/prefs/pref_hash_filter.cc (right): https://codereview.chromium.org/114223002/diff/1220002/chrome/browser/prefs/pref_hash_filter.cc#newcode108 chrome/browser/prefs/pref_hash_filter.cc:108: pref_store_contents); You shouldn't be passing both pref_store_contents and value. ...
6 years, 11 months ago (2014-01-13 21:54:53 UTC) #16
gab
Erik, PTAL. I don't think a specific unit test is required for TrackedPreference as its ...
6 years, 11 months ago (2014-01-15 00:33:16 UTC) #17
gab
+Robert who wants to take a look. Cheers, Gab
6 years, 11 months ago (2014-01-15 21:54:26 UTC) #18
erikwright (departed)
https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h File chrome/browser/prefs/pref_hash_filter.h (right): https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h#newcode37 chrome/browser/prefs/pref_hash_filter.h:37: struct TrackedPreferenceMetaData { nit: I think Metadata is more ...
6 years, 11 months ago (2014-01-15 22:27:41 UTC) #19
gab
PTAL, thanks! https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h File chrome/browser/prefs/pref_hash_filter.h (right): https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h#newcode37 chrome/browser/prefs/pref_hash_filter.h:37: struct TrackedPreferenceMetaData { On 2014/01/15 22:27:42, erikwright ...
6 years, 11 months ago (2014-01-16 01:28:01 UTC) #20
robertshield
https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h File chrome/browser/prefs/pref_hash_filter.h (right): https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h#newcode42 chrome/browser/prefs/pref_hash_filter.h:42: bool allow_enforcement; nit: make this an enum value too? ...
6 years, 11 months ago (2014-01-16 03:59:30 UTC) #21
erikwright (departed)
https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h File chrome/browser/prefs/pref_hash_filter.h (right): https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h#newcode67 chrome/browser/prefs/pref_hash_filter.h:67: typedef std::map<std::string, scoped_ptr<const TrackedPreference> > I believe it is ...
6 years, 11 months ago (2014-01-16 16:48:31 UTC) #22
gab
Erik/Robert, PTAL. Thanks! Gab https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h File chrome/browser/prefs/pref_hash_filter.h (right): https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h#newcode42 chrome/browser/prefs/pref_hash_filter.h:42: bool allow_enforcement; On 2014/01/16 03:59:30, ...
6 years, 11 months ago (2014-01-16 18:58:04 UTC) #23
robertshield
lgtm https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h File chrome/browser/prefs/pref_hash_filter.h (right): https://codereview.chromium.org/114223002/diff/1700001/chrome/browser/prefs/pref_hash_filter.h#newcode42 chrome/browser/prefs/pref_hash_filter.h:42: bool allow_enforcement; On 2014/01/16 18:58:06, gab wrote: > ...
6 years, 11 months ago (2014-01-17 03:59:44 UTC) #24
gab
Bernhard, please take a look. Thanks! Gab
6 years, 11 months ago (2014-01-17 16:28:24 UTC) #25
Bernhard Bauer
We are starting to have a lot of classes in c/b/p. I think it would ...
6 years, 11 months ago (2014-01-17 17:00:04 UTC) #26
gab
Done, only moved new files for now; logged a bug (http://crbug.com/335667) to move existing ones ...
6 years, 11 months ago (2014-01-17 19:56:48 UTC) #27
gab
Note: responded to nits in patch set 34; patch set 35 is a move-only patch ...
6 years, 11 months ago (2014-01-17 19:57:52 UTC) #28
erikwright (departed)
Some small comments. I need to look deeper later. https://codereview.chromium.org/114223002/diff/2070002/chrome/browser/prefs/tracked_preference.h File chrome/browser/prefs/tracked_preference.h (right): https://codereview.chromium.org/114223002/diff/2070002/chrome/browser/prefs/tracked_preference.h#newcode1 chrome/browser/prefs/tracked_preference.h:1: ...
6 years, 11 months ago (2014-01-17 20:22:59 UTC) #29
gab
Done, PTAL. Thanks! Gab https://codereview.chromium.org/114223002/diff/2070002/chrome/browser/prefs/tracked_preference.h File chrome/browser/prefs/tracked_preference.h (right): https://codereview.chromium.org/114223002/diff/2070002/chrome/browser/prefs/tracked_preference.h#newcode1 chrome/browser/prefs/tracked_preference.h:1: // Copyright 2013 The Chromium ...
6 years, 11 months ago (2014-01-17 21:32:00 UTC) #30
Bernhard Bauer
LGTM!
6 years, 11 months ago (2014-01-20 12:03:40 UTC) #31
erikwright (departed)
LGTM with a few IWYU fixes. https://codereview.chromium.org/114223002/diff/3020001/chrome/browser/prefs/tracked/tracked_atomic_preference.cc File chrome/browser/prefs/tracked/tracked_atomic_preference.cc (right): https://codereview.chromium.org/114223002/diff/3020001/chrome/browser/prefs/tracked/tracked_atomic_preference.cc#newcode21 chrome/browser/prefs/tracked/tracked_atomic_preference.cc:21: pref_hash_store->StoreHash(pref_path_, value); pref_hash_store.h ...
6 years, 11 months ago (2014-01-21 18:44:44 UTC) #32
gab
Thanks, done. Also merged with r246052 (FilterSerializeData()), PTAL and confirm that what I did in ...
6 years, 11 months ago (2014-01-21 20:51:41 UTC) #33
gab
PTAL at the latest patch set; merged with crrev.com/247349 (which caused a subtle merge issue ...
6 years, 10 months ago (2014-01-30 01:37:57 UTC) #34
Bernhard Bauer
lgtm
6 years, 10 months ago (2014-01-30 10:33:35 UTC) #35
Alexei Svitkine (slow)
still lgtm
6 years, 10 months ago (2014-01-30 15:12:54 UTC) #36
erikwright (departed)
LGTM with two nits. https://codereview.chromium.org/114223002/diff/3440001/chrome/browser/prefs/tracked/tracked_atomic_preference.cc File chrome/browser/prefs/tracked/tracked_atomic_preference.cc (right): https://codereview.chromium.org/114223002/diff/3440001/chrome/browser/prefs/tracked/tracked_atomic_preference.cc#newcode16 chrome/browser/prefs/tracked/tracked_atomic_preference.cc:16: : pref_path_(pref_path), pref_hash_store_(pref_hash_store), Initialize in ...
6 years, 10 months ago (2014-01-30 15:32:17 UTC) #37
gab
Thanks, done. https://codereview.chromium.org/114223002/diff/3440001/chrome/browser/prefs/tracked/tracked_atomic_preference.cc File chrome/browser/prefs/tracked/tracked_atomic_preference.cc (right): https://codereview.chromium.org/114223002/diff/3440001/chrome/browser/prefs/tracked/tracked_atomic_preference.cc#newcode16 chrome/browser/prefs/tracked/tracked_atomic_preference.cc:16: : pref_path_(pref_path), pref_hash_store_(pref_hash_store), On 2014/01/30 15:32:18, erikwright ...
6 years, 10 months ago (2014-01-30 15:57:17 UTC) #38
gab
The CQ bit was checked by gab@chromium.org
6 years, 10 months ago (2014-02-02 04:21:23 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/114223002/3500001
6 years, 10 months ago (2014-02-02 04:21:38 UTC) #40
commit-bot: I haz the power
Change committed as 248393
6 years, 10 months ago (2014-02-02 06:17:56 UTC) #41
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-02 06:18:03 UTC) #42
commit-bot: I haz the power
6 years, 10 months ago (2014-02-02 06:18:03 UTC) #43
Message was sent while issue was closed.
CQ bit was unchecked on CL. Ignoring.

Powered by Google App Engine
This is Rietveld 408576698