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

Side by Side Diff: chrome/browser/prefs/tracked/tracked_split_preference.h

Issue 114223002: Multi-strategy based tracking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r248367 Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PREFS_TRACKED_TRACKED_SPLIT_PREFERENCE_H_
6 #define CHROME_BROWSER_PREFS_TRACKED_TRACKED_SPLIT_PREFERENCE_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "base/macros.h"
12 #include "chrome/browser/prefs/pref_hash_filter.h"
13 #include "chrome/browser/prefs/tracked/tracked_preference.h"
14 #include "chrome/browser/prefs/tracked/tracked_preference_helper.h"
15
16 class PrefHashStore;
17
18 // A TrackedSplitPreference must be tracking a dictionary pref. Each top-level
19 // entry in its dictionary is tracked and enforced independently.
20 // Note: preferences using this strategy must be kept in sync with
21 // TrackedSplitPreferences in histograms.xml.
22 class TrackedSplitPreference : public TrackedPreference {
23 public:
24 // Constructs a TrackedSplitPreference. |pref_path| must be a dictionary pref.
25 TrackedSplitPreference(
26 const std::string& pref_path,
27 size_t reporting_id,
28 size_t reporting_ids_count,
29 PrefHashFilter::EnforcementLevel enforcement_level,
30 PrefHashStore* pref_hash_store);
31
32 // TrackedPreference implementation.
33 virtual void OnNewValue(const base::Value* value) const OVERRIDE;
34 virtual void EnforceAndReport(
35 base::DictionaryValue* pref_store_contents) const OVERRIDE;
36
37 private:
38 const std::string pref_path_;
39 const TrackedPreferenceHelper helper_;
40 PrefHashStore* pref_hash_store_;
41
42 DISALLOW_COPY_AND_ASSIGN(TrackedSplitPreference);
43 };
44
45 #endif // CHROME_BROWSER_PREFS_TRACKED_TRACKED_SPLIT_PREFERENCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/tracked/tracked_preference_helper.cc ('k') | chrome/browser/prefs/tracked/tracked_split_preference.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698