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" | |
gab
2013/12/11 18:37:14
nit: +empty line above
erikwright (departed)
2013/12/12 22:02:57
Done.
| |
10 | |
11 namespace base { | |
12 class DictionaryValue; | |
13 class Value; | |
14 } // namespace base | |
15 | |
16 // Filters preferences as they are loaded from disk or updated at runtime. | |
17 // Currently supported only by JsonPrefStore. | |
18 class BASE_PREFS_EXPORT PrefFilter { | |
19 public: | |
20 virtual ~PrefFilter() {} | |
21 | |
22 // Receives notification when the pref store data has been loaded but before | |
23 // Observers are notified. | |
24 // Changes made by a PrefFilter during FilterOnLoad do not result in | |
25 // notifications to |PrefStore::Observer|s. | |
26 virtual void FilterOnLoad(base::DictionaryValue* pref_store_contents) = 0; | |
27 | |
28 // Receives notification when a pref store value is changed, before Observers | |
29 // are notified. | |
30 virtual void FilterUpdate(const std::string& path, | |
31 const base::Value* value) = 0; | |
32 }; | |
33 | |
34 #endif // BASE_PREFS_PREF_FILTER_H_ | |
OLD | NEW |