| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "components/user_prefs/tracked/pref_hash_filter.h" | 17 #include "components/user_prefs/tracked/pref_hash_filter.h" |
| 18 #include "services/preferences/public/interfaces/preferences.mojom.h" |
| 18 #include "services/preferences/public/interfaces/tracked_preference_validation_d
elegate.mojom.h" | 19 #include "services/preferences/public/interfaces/tracked_preference_validation_d
elegate.mojom.h" |
| 19 | 20 |
| 20 class HashStoreContents; | 21 class HashStoreContents; |
| 21 class PersistentPrefStore; | 22 class PersistentPrefStore; |
| 22 class PrefHashStore; | 23 class PrefHashStore; |
| 23 class PrefService; | 24 class PrefService; |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| 26 class DictionaryValue; | 27 class DictionaryValue; |
| 27 class SequencedTaskRunner; | 28 class SequencedTaskRunner; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Creates a PersistentPrefStore providing access to the user preferences of | 89 // Creates a PersistentPrefStore providing access to the user preferences of |
| 89 // the managed profile. If |on_reset| is provided, it will be invoked if a | 90 // the managed profile. If |on_reset| is provided, it will be invoked if a |
| 90 // reset occurs as a result of loading the profile's prefs. | 91 // reset occurs as a result of loading the profile's prefs. |
| 91 // An optional |validation_delegate| will be notified | 92 // An optional |validation_delegate| will be notified |
| 92 // of the status of each tracked preference as they are checked. | 93 // of the status of each tracked preference as they are checked. |
| 93 PersistentPrefStore* CreateProfilePrefStore( | 94 PersistentPrefStore* CreateProfilePrefStore( |
| 94 const scoped_refptr<base::SingleThreadTaskRunner>& pref_task_runner, | 95 const scoped_refptr<base::SingleThreadTaskRunner>& pref_task_runner, |
| 95 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, | 96 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, |
| 96 const base::Closure& on_reset_on_load, | 97 const base::Closure& on_reset_on_load, |
| 97 std::unique_ptr<prefs::mojom::TrackedPreferenceValidationDelegate>* | 98 std::unique_ptr<prefs::mojom::TrackedPreferenceValidationDelegate>* |
| 98 validation_delegate); | 99 validation_delegate, |
| 100 prefs::mojom::PersistentPrefStoreConnectorPtr* connector); |
| 99 | 101 |
| 100 // Initializes the preferences for the managed profile with the preference | 102 // Initializes the preferences for the managed profile with the preference |
| 101 // values in |master_prefs|. Acts synchronously, including blocking IO. | 103 // values in |master_prefs|. Acts synchronously, including blocking IO. |
| 102 // Returns true on success. | 104 // Returns true on success. |
| 103 bool InitializePrefsFromMasterPrefs( | 105 bool InitializePrefsFromMasterPrefs( |
| 104 std::unique_ptr<base::DictionaryValue> master_prefs); | 106 std::unique_ptr<base::DictionaryValue> master_prefs); |
| 105 | 107 |
| 106 // Creates a single-file PrefStore as was used in M34 and earlier. Used only | 108 // Creates a single-file PrefStore as was used in M34 and earlier. Used only |
| 107 // for testing migration. | 109 // for testing migration. |
| 108 PersistentPrefStore* CreateDeprecatedCombinedProfilePrefStore( | 110 PersistentPrefStore* CreateDeprecatedCombinedProfilePrefStore( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 127 tracking_configuration_; | 129 tracking_configuration_; |
| 128 const size_t reporting_ids_count_; | 130 const size_t reporting_ids_count_; |
| 129 const std::string seed_; | 131 const std::string seed_; |
| 130 const std::string legacy_device_id_; | 132 const std::string legacy_device_id_; |
| 131 PrefService* local_state_; | 133 PrefService* local_state_; |
| 132 | 134 |
| 133 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); | 135 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ | 138 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ |
| OLD | NEW |