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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // of the status of each tracked preference as they are checked. | 85 // of the status of each tracked preference as they are checked. |
86 PersistentPrefStore* CreateProfilePrefStore( | 86 PersistentPrefStore* CreateProfilePrefStore( |
87 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, | 87 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, |
88 const base::Closure& on_reset_on_load, | 88 const base::Closure& on_reset_on_load, |
89 TrackedPreferenceValidationDelegate* validation_delegate); | 89 TrackedPreferenceValidationDelegate* validation_delegate); |
90 | 90 |
91 // Initializes the preferences for the managed profile with the preference | 91 // Initializes the preferences for the managed profile with the preference |
92 // values in |master_prefs|. Acts synchronously, including blocking IO. | 92 // values in |master_prefs|. Acts synchronously, including blocking IO. |
93 // Returns true on success. | 93 // Returns true on success. |
94 bool InitializePrefsFromMasterPrefs( | 94 bool InitializePrefsFromMasterPrefs( |
95 const base::DictionaryValue& master_prefs); | 95 std::unique_ptr<base::DictionaryValue> master_prefs); |
96 | 96 |
97 // Creates a single-file PrefStore as was used in M34 and earlier. Used only | 97 // Creates a single-file PrefStore as was used in M34 and earlier. Used only |
98 // for testing migration. | 98 // for testing migration. |
99 PersistentPrefStore* CreateDeprecatedCombinedProfilePrefStore( | 99 PersistentPrefStore* CreateDeprecatedCombinedProfilePrefStore( |
100 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); | 100 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); |
101 | 101 |
102 private: | 102 private: |
103 // Returns a PrefHashStore for the managed profile. Should only be called | 103 // Returns a PrefHashStore for the managed profile. Should only be called |
104 // if |kPlatformSupportsPreferenceTracking|. |use_super_mac| determines | 104 // if |kPlatformSupportsPreferenceTracking|. |use_super_mac| determines |
105 // whether the returned object will calculate, store, and validate super MACs | 105 // whether the returned object will calculate, store, and validate super MACs |
(...skipping 12 matching lines...) Expand all Loading... |
118 tracking_configuration_; | 118 tracking_configuration_; |
119 const size_t reporting_ids_count_; | 119 const size_t reporting_ids_count_; |
120 const std::string seed_; | 120 const std::string seed_; |
121 const std::string legacy_device_id_; | 121 const std::string legacy_device_id_; |
122 PrefService* local_state_; | 122 PrefService* local_state_; |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); | 124 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); |
125 }; | 125 }; |
126 | 126 |
127 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ | 127 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ |
OLD | NEW |