OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_USER_PREFS_TRACKED_SEGREGATED_PREF_STORE_H_ | 5 #ifndef COMPONENTS_USER_PREFS_TRACKED_SEGREGATED_PREF_STORE_H_ |
6 #define COMPONENTS_USER_PREFS_TRACKED_SEGREGATED_PREF_STORE_H_ | 6 #define COMPONENTS_USER_PREFS_TRACKED_SEGREGATED_PREF_STORE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "base/prefs/persistent_pref_store.h" | 18 #include "components/prefs/persistent_pref_store.h" |
19 | 19 |
20 // Provides a unified PersistentPrefStore implementation that splits its storage | 20 // Provides a unified PersistentPrefStore implementation that splits its storage |
21 // and retrieval between two underlying PersistentPrefStore instances: a set of | 21 // and retrieval between two underlying PersistentPrefStore instances: a set of |
22 // preference names is used to partition the preferences. | 22 // preference names is used to partition the preferences. |
23 // | 23 // |
24 // Combines properties of the two stores as follows: | 24 // Combines properties of the two stores as follows: |
25 // * The unified read error will be: | 25 // * The unified read error will be: |
26 // Selected Store Error | 26 // Selected Store Error |
27 // Default Store Error | NO_ERROR | NO_FILE | other selected | | 27 // Default Store Error | NO_ERROR | NO_FILE | other selected | |
28 // NO_ERROR | NO_ERROR | NO_ERROR | other selected | | 28 // NO_ERROR | NO_ERROR | NO_ERROR | other selected | |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::set<std::string> selected_preference_names_; | 103 std::set<std::string> selected_preference_names_; |
104 | 104 |
105 scoped_ptr<PersistentPrefStore::ReadErrorDelegate> read_error_delegate_; | 105 scoped_ptr<PersistentPrefStore::ReadErrorDelegate> read_error_delegate_; |
106 base::ObserverList<PrefStore::Observer, true> observers_; | 106 base::ObserverList<PrefStore::Observer, true> observers_; |
107 AggregatingObserver aggregating_observer_; | 107 AggregatingObserver aggregating_observer_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(SegregatedPrefStore); | 109 DISALLOW_COPY_AND_ASSIGN(SegregatedPrefStore); |
110 }; | 110 }; |
111 | 111 |
112 #endif // COMPONENTS_PREFS_TRACKED_SEGREGATED_PREF_STORE_H_ | 112 #endif // COMPONENTS_PREFS_TRACKED_SEGREGATED_PREF_STORE_H_ |
OLD | NEW |