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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 tracking_configuration, | 49 tracking_configuration, |
50 size_t reporting_ids_count, | 50 size_t reporting_ids_count, |
51 const std::string& seed, | 51 const std::string& seed, |
52 const std::string& device_id, | 52 const std::string& device_id, |
53 PrefService* local_state); | 53 PrefService* local_state); |
54 | 54 |
55 ~ProfilePrefStoreManager(); | 55 ~ProfilePrefStoreManager(); |
56 | 56 |
57 static const bool kPlatformSupportsPreferenceTracking; | 57 static const bool kPlatformSupportsPreferenceTracking; |
58 | 58 |
59 // Register local state prefs used by the profile preferences system. | |
60 static void RegisterPrefs(PrefRegistrySimple* registry); | |
61 | |
62 // Register user prefs used by the profile preferences system. | 59 // Register user prefs used by the profile preferences system. |
63 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 60 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
64 | 61 |
65 // Deletes stored hashes for all profiles from |local_state|. | |
66 static void ResetAllPrefHashStores(PrefService* local_state); | |
67 | |
68 // Retrieves the time of the last preference reset event, if any, for | 62 // Retrieves the time of the last preference reset event, if any, for |
69 // |pref_service|. Assumes that |pref_service| is backed by a PrefStore that | 63 // |pref_service|. Assumes that |pref_service| is backed by a PrefStore that |
70 // was built by ProfilePrefStoreManager. | 64 // was built by ProfilePrefStoreManager. |
71 // If no reset has occurred, returns a null |Time|. | 65 // If no reset has occurred, returns a null |Time|. |
72 static base::Time GetResetTime(PrefService* pref_service); | 66 static base::Time GetResetTime(PrefService* pref_service); |
73 | 67 |
74 // Clears the time of the last preference reset event, if any, for | 68 // Clears the time of the last preference reset event, if any, for |
75 // |pref_service|. Assumes that |pref_service| is backed by a PrefStore that | 69 // |pref_service|. Assumes that |pref_service| is backed by a PrefStore that |
76 // was built by ProfilePrefStoreManager. | 70 // was built by ProfilePrefStoreManager. |
77 static void ClearResetTime(PrefService* pref_service); | 71 static void ClearResetTime(PrefService* pref_service); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 tracking_configuration_; | 104 tracking_configuration_; |
111 const size_t reporting_ids_count_; | 105 const size_t reporting_ids_count_; |
112 const std::string seed_; | 106 const std::string seed_; |
113 const std::string device_id_; | 107 const std::string device_id_; |
114 PrefService* local_state_; | 108 PrefService* local_state_; |
115 | 109 |
116 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); | 110 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); |
117 }; | 111 }; |
118 | 112 |
119 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ | 113 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ |
OLD | NEW |