Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: chrome/browser/prefs/profile_pref_store_manager.h

Issue 266553002: Add TrackedPreferenceValidationDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix expectations for android and cros Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/browser/prefs/pref_hash_filter.h" 15 #include "chrome/browser/prefs/pref_hash_filter.h"
16 16
17 class PersistentPrefStore; 17 class PersistentPrefStore;
18 class PrefHashStoreImpl; 18 class PrefHashStoreImpl;
19 class PrefService; 19 class PrefService;
20 class TrackedPreferenceValidationObserver;
20 21
21 namespace base { 22 namespace base {
22 class DictionaryValue; 23 class DictionaryValue;
23 class SequencedTaskRunner; 24 class SequencedTaskRunner;
24 } // namespace base 25 } // namespace base
25 26
26 namespace user_prefs { 27 namespace user_prefs {
27 class PrefRegistrySyncable; 28 class PrefRegistrySyncable;
28 } // namespace user_prefs 29 } // namespace user_prefs
29 30
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 // Clears the time of the last preference reset event, if any, for 76 // Clears the time of the last preference reset event, if any, for
76 // |pref_service|. Assumes that |pref_service| is backed by a PrefStore that 77 // |pref_service|. Assumes that |pref_service| is backed by a PrefStore that
77 // was built by ProfilePrefStoreManager. 78 // was built by ProfilePrefStoreManager.
78 static void ClearResetTime(PrefService* pref_service); 79 static void ClearResetTime(PrefService* pref_service);
79 80
80 // Deletes stored hashes for the managed profile. 81 // Deletes stored hashes for the managed profile.
81 void ResetPrefHashStore(); 82 void ResetPrefHashStore();
82 83
83 // Creates a PersistentPrefStore providing access to the user preferences of 84 // Creates a PersistentPrefStore providing access to the user preferences of
84 // the managed profile. 85 // the managed profile. |verification_observer| will be notified of the status
86 // of each tracked preference as they are checked.
85 PersistentPrefStore* CreateProfilePrefStore( 87 PersistentPrefStore* CreateProfilePrefStore(
86 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); 88 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner,
89 scoped_ptr<TrackedPreferenceValidationObserver> verification_observer);
87 90
88 // Checks the presence/version of the hash store for the managed profile and 91 // Checks the presence/version of the hash store for the managed profile and
89 // creates or updates it if necessary. Completes asynchronously and is safe if 92 // creates or updates it if necessary. Completes asynchronously and is safe if
90 // the preferences/hash store are concurrently loaded/manipulated by another 93 // the preferences/hash store are concurrently loaded/manipulated by another
91 // task. 94 // task.
92 void UpdateProfileHashStoreIfRequired( 95 void UpdateProfileHashStoreIfRequired(
93 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); 96 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner);
94 97
95 // Initializes the preferences for the managed profile with the preference 98 // Initializes the preferences for the managed profile with the preference
96 // values in |master_prefs|. Acts synchronously, including blocking IO. 99 // values in |master_prefs|. Acts synchronously, including blocking IO.
(...skipping 20 matching lines...) Expand all
117 tracking_configuration_; 120 tracking_configuration_;
118 const size_t reporting_ids_count_; 121 const size_t reporting_ids_count_;
119 const std::string seed_; 122 const std::string seed_;
120 const std::string device_id_; 123 const std::string device_id_;
121 PrefService* local_state_; 124 PrefService* local_state_;
122 125
123 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); 126 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager);
124 }; 127 };
125 128
126 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ 129 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698