OLD | NEW |
---|---|
(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 #include "base/prefs/base_prefs_export.h" | |
10 | |
11 class PersistentPrefStore; | |
12 | |
13 // Filters preferences as they are loaded from disk or updated at runtime. | |
14 // Currently supported only by JsonPrefStore. | |
15 class BASE_PREFS_EXPORT PrefFilter { | |
gab
2013/12/04 22:22:30
I don't really like the term "filter"; to me a fil
erikwright (departed)
2013/12/05 23:48:00
I'm happy to change it. Rather than do that now I'
| |
16 public: | |
17 virtual ~PrefFilter() {} | |
18 | |
19 // Receives notification when the pref store data has been loaded but before | |
20 // any other clients are notified. | |
21 // Changes made by a PrefFilter during FilterOnLoad do not result in | |
22 // notifications to |PrefStore::Observer|s. | |
23 virtual void FilterOnLoad(PersistentPrefStore* pref_store) = 0; | |
24 | |
25 // Receives notification when a pref store value is changed, before any other | |
26 // clients are notified. | |
27 virtual void FilterUpdate(PersistentPrefStore* pref_store, | |
28 const std::string& path) = 0; | |
29 }; | |
30 | |
31 #endif // BASE_PREFS_PREF_FILTER_H_ | |
OLD | NEW |