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 #include "chrome/browser/prefs/profile_pref_store_manager.h" | 5 #include "chrome/browser/prefs/profile_pref_store_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void ProfilePrefStoreManager::SetPreferenceValidationRegistryPathForTesting( | 95 void ProfilePrefStoreManager::SetPreferenceValidationRegistryPathForTesting( |
96 const base::string16* path) { | 96 const base::string16* path) { |
97 DCHECK(!path->empty()); | 97 DCHECK(!path->empty()); |
98 g_preference_validation_registry_path_for_testing = path; | 98 g_preference_validation_registry_path_for_testing = path; |
99 } | 99 } |
100 #endif // OS_WIN | 100 #endif // OS_WIN |
101 | 101 |
102 PersistentPrefStore* ProfilePrefStoreManager::CreateProfilePrefStore( | 102 PersistentPrefStore* ProfilePrefStoreManager::CreateProfilePrefStore( |
103 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, | 103 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, |
104 const base::Closure& on_reset_on_load, | 104 const base::Closure& on_reset_on_load, |
105 TrackedPreferenceValidationDelegate* validation_delegate) { | 105 prefs::mojom::TrackedPreferenceValidationDelegate* validation_delegate) { |
106 std::unique_ptr<PrefFilter> pref_filter; | 106 std::unique_ptr<PrefFilter> pref_filter; |
107 if (!kPlatformSupportsPreferenceTracking) { | 107 if (!kPlatformSupportsPreferenceTracking) { |
108 return new JsonPrefStore(profile_path_.Append(chrome::kPreferencesFilename), | 108 return new JsonPrefStore(profile_path_.Append(chrome::kPreferencesFilename), |
109 io_task_runner.get(), | 109 io_task_runner.get(), |
110 std::unique_ptr<PrefFilter>()); | 110 std::unique_ptr<PrefFilter>()); |
111 } | 111 } |
112 | 112 |
113 std::vector<PrefHashFilter::TrackedPreferenceMetadata> | 113 std::vector<PrefHashFilter::TrackedPreferenceMetadata> |
114 unprotected_configuration; | 114 unprotected_configuration; |
115 std::vector<PrefHashFilter::TrackedPreferenceMetadata> | 115 std::vector<PrefHashFilter::TrackedPreferenceMetadata> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 ? base::MakeUnique<RegistryHashStoreContentsWin>( | 220 ? base::MakeUnique<RegistryHashStoreContentsWin>( |
221 *g_preference_validation_registry_path_for_testing, | 221 *g_preference_validation_registry_path_for_testing, |
222 profile_path_.BaseName().LossyDisplayName()) | 222 profile_path_.BaseName().LossyDisplayName()) |
223 : base::MakeUnique<RegistryHashStoreContentsWin>( | 223 : base::MakeUnique<RegistryHashStoreContentsWin>( |
224 BrowserDistribution::GetDistribution()->GetRegistryPath(), | 224 BrowserDistribution::GetDistribution()->GetRegistryPath(), |
225 profile_path_.BaseName().LossyDisplayName())); | 225 profile_path_.BaseName().LossyDisplayName())); |
226 #else | 226 #else |
227 return std::make_pair(nullptr, nullptr); | 227 return std::make_pair(nullptr, nullptr); |
228 #endif | 228 #endif |
229 } | 229 } |
OLD | NEW |