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

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

Issue 324493002: Move preference MACs to the protected preference stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add tracking for MAC migrations from local state. Created 6 years, 6 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 PrefHashStore;
19 class PrefService; 19 class PrefService;
20 class TrackedPreferenceValidationDelegate; 20 class TrackedPreferenceValidationDelegate;
21 21
22 namespace base { 22 namespace base {
23 class DictionaryValue; 23 class DictionaryValue;
24 class SequencedTaskRunner; 24 class SequencedTaskRunner;
25 } // namespace base 25 } // namespace base
26 26
27 namespace user_prefs { 27 namespace user_prefs {
28 class PrefRegistrySyncable; 28 class PrefRegistrySyncable;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Returns true on success. 90 // Returns true on success.
91 bool InitializePrefsFromMasterPrefs( 91 bool InitializePrefsFromMasterPrefs(
92 const base::DictionaryValue& master_prefs); 92 const base::DictionaryValue& master_prefs);
93 93
94 // Creates a single-file PrefStore as was used in M34 and earlier. Used only 94 // Creates a single-file PrefStore as was used in M34 and earlier. Used only
95 // for testing migration. 95 // for testing migration.
96 PersistentPrefStore* CreateDeprecatedCombinedProfilePrefStore( 96 PersistentPrefStore* CreateDeprecatedCombinedProfilePrefStore(
97 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); 97 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner);
98 98
99 private: 99 private:
100 // Returns a PrefHashStoreImpl for the managed profile. Should only be called 100 // Returns a PrefHashStore for the managed profile. Should only be called
101 // if |kPlatformSupportsPreferenceTracking|. 101 // if |kPlatformSupportsPreferenceTracking|. |use_super_mac| determines
102 scoped_ptr<PrefHashStoreImpl> GetPrefHashStoreImpl(); 102 // whether the returned object will calculate, store, and validate super MACs
103 // (and, by extension, accept non-null newly protected preferences as
104 // TrustedInitialized).
105 scoped_ptr<PrefHashStore> GetPrefHashStore(bool use_super_mac);
103 106
104 const base::FilePath profile_path_; 107 const base::FilePath profile_path_;
105 const std::vector<PrefHashFilter::TrackedPreferenceMetadata> 108 const std::vector<PrefHashFilter::TrackedPreferenceMetadata>
106 tracking_configuration_; 109 tracking_configuration_;
107 const size_t reporting_ids_count_; 110 const size_t reporting_ids_count_;
108 const std::string seed_; 111 const std::string seed_;
109 const std::string device_id_; 112 const std::string device_id_;
110 PrefService* local_state_; 113 PrefService* local_state_;
111 114
112 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager); 115 DISALLOW_COPY_AND_ASSIGN(ProfilePrefStoreManager);
113 }; 116 };
114 117
115 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_ 118 #endif // CHROME_BROWSER_PREFS_PROFILE_PREF_STORE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698