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

Side by Side Diff: base/prefs/pref_filter.h

Issue 90563003: Fix a race condition in preference metric reporting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also filter 'empty loads' as in new run or corrupted pref file scenarios. Created 7 years 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
« no previous file with comments | « base/prefs/json_pref_store_unittest.cc ('k') | base/prefs/pref_service_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 BASE_PREFS_PREF_FILTER_H_
6 #define BASE_PREFS_PREF_FILTER_H_
7
8 #include <string>
9
10 #include "base/prefs/base_prefs_export.h"
11
12 namespace base {
13 class DictionaryValue;
14 class Value;
15 } // namespace base
16
17 // Filters preferences as they are loaded from disk or updated at runtime.
18 // Currently supported only by JsonPrefStore.
19 class BASE_PREFS_EXPORT PrefFilter {
20 public:
21 virtual ~PrefFilter() {}
22
23 // Receives notification when the pref store data has been loaded but before
24 // Observers are notified.
25 // Changes made by a PrefFilter during FilterOnLoad do not result in
26 // notifications to |PrefStore::Observer|s.
27 virtual void FilterOnLoad(base::DictionaryValue* pref_store_contents) = 0;
28
29 // Receives notification when a pref store value is changed, before Observers
30 // are notified.
31 virtual void FilterUpdate(const std::string& path,
32 const base::Value* value) = 0;
33 };
34
35 #endif // BASE_PREFS_PREF_FILTER_H_
OLDNEW
« no previous file with comments | « base/prefs/json_pref_store_unittest.cc ('k') | base/prefs/pref_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698