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 CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ |
6 #define CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ | 6 #define CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // task. | 91 // task. |
92 void UpdateProfileHashStoreIfRequired( | 92 void UpdateProfileHashStoreIfRequired( |
93 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); | 93 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); |
94 | 94 |
95 // Initializes the preferences for the managed profile with the preference | 95 // Initializes the preferences for the managed profile with the preference |
96 // values in |master_prefs|. Acts synchronously, including blocking IO. | 96 // values in |master_prefs|. Acts synchronously, including blocking IO. |
97 // Returns true on success. | 97 // Returns true on success. |
98 bool InitializePrefsFromMasterPrefs( | 98 bool InitializePrefsFromMasterPrefs( |
99 const base::DictionaryValue& master_prefs); | 99 const base::DictionaryValue& master_prefs); |
100 | 100 |
| 101 // Creates a single-file PrefStore as was used in M34 and earlier. Used only |
| 102 // for testing migration. |
| 103 PersistentPrefStore* CreateDeprecatedCombinedProfilePrefStore( |
| 104 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); |
| 105 |
101 private: | 106 private: |
102 class InitializeHashStoreObserver; | 107 class InitializeHashStoreObserver; |
103 | 108 |
104 // Returns a PrefHashStoreImpl for the managed profile. Should only be called | 109 // Returns a PrefHashStoreImpl for the managed profile. Should only be called |
105 // if |kPlatformSupportsPreferenceTracking|. | 110 // if |kPlatformSupportsPreferenceTracking|. |
106 scoped_ptr<PrefHashStoreImpl> GetPrefHashStoreImpl(); | 111 scoped_ptr<PrefHashStoreImpl> GetPrefHashStoreImpl(); |
107 | 112 |
| 113 // Returns a PrefHashStore that is a copy of the current state of the real |
| 114 // hash store. |
| 115 scoped_ptr<PrefHashStore> CopyPrefHashStore(); |
| 116 |
108 const base::FilePath profile_path_; | 117 const base::FilePath profile_path_; |
109 const std::vector<PrefHashFilter::TrackedPreferenceMetadata> | 118 const std::vector<PrefHashFilter::TrackedPreferenceMetadata> |
110 tracking_configuration_; | 119 tracking_configuration_; |
111 const size_t reporting_ids_count_; | 120 const size_t reporting_ids_count_; |
112 const std::string seed_; | 121 const std::string seed_; |
113 const std::string device_id_; | 122 const std::string device_id_; |
114 PrefService* local_state_; | 123 PrefService* local_state_; |
115 | 124 |
116 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); | 125 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); |
117 }; | 126 }; |
118 | 127 |
119 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ | 128 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ |
OLD | NEW |