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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 reporting_ids_count_, true)); | 141 reporting_ids_count_, true)); |
142 | 142 |
143 PrefHashFilter* raw_unprotected_pref_hash_filter = | 143 PrefHashFilter* raw_unprotected_pref_hash_filter = |
144 unprotected_pref_hash_filter.get(); | 144 unprotected_pref_hash_filter.get(); |
145 PrefHashFilter* raw_protected_pref_hash_filter = | 145 PrefHashFilter* raw_protected_pref_hash_filter = |
146 protected_pref_hash_filter.get(); | 146 protected_pref_hash_filter.get(); |
147 | 147 |
148 scoped_refptr<JsonPrefStore> unprotected_pref_store(new JsonPrefStore( | 148 scoped_refptr<JsonPrefStore> unprotected_pref_store(new JsonPrefStore( |
149 profile_path_.Append(chrome::kPreferencesFilename), io_task_runner.get(), | 149 profile_path_.Append(chrome::kPreferencesFilename), io_task_runner.get(), |
150 std::move(unprotected_pref_hash_filter))); | 150 std::move(unprotected_pref_hash_filter))); |
151 // TODO(gab): Remove kDeprecatedProtectedPreferencesFilename as an alternate | |
152 // file in M40+. | |
153 scoped_refptr<JsonPrefStore> protected_pref_store(new JsonPrefStore( | 151 scoped_refptr<JsonPrefStore> protected_pref_store(new JsonPrefStore( |
154 profile_path_.Append(chrome::kSecurePreferencesFilename), | 152 profile_path_.Append(chrome::kSecurePreferencesFilename), |
155 profile_path_.Append(chrome::kProtectedPreferencesFilenameDeprecated), | |
156 io_task_runner.get(), std::move(protected_pref_hash_filter))); | 153 io_task_runner.get(), std::move(protected_pref_hash_filter))); |
157 | 154 |
158 SetupTrackedPreferencesMigration( | 155 SetupTrackedPreferencesMigration( |
159 unprotected_pref_names, protected_pref_names, | 156 unprotected_pref_names, protected_pref_names, |
160 base::Bind(&RemoveValueSilently, unprotected_pref_store->AsWeakPtr()), | 157 base::Bind(&RemoveValueSilently, unprotected_pref_store->AsWeakPtr()), |
161 base::Bind(&RemoveValueSilently, protected_pref_store->AsWeakPtr()), | 158 base::Bind(&RemoveValueSilently, protected_pref_store->AsWeakPtr()), |
162 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteReply, | 159 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteReply, |
163 unprotected_pref_store->AsWeakPtr()), | 160 unprotected_pref_store->AsWeakPtr()), |
164 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteReply, | 161 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteReply, |
165 protected_pref_store->AsWeakPtr()), | 162 protected_pref_store->AsWeakPtr()), |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 ? base::MakeUnique<RegistryHashStoreContentsWin>( | 218 ? base::MakeUnique<RegistryHashStoreContentsWin>( |
222 *g_preference_validation_registry_path_for_testing, | 219 *g_preference_validation_registry_path_for_testing, |
223 profile_path_.BaseName().LossyDisplayName()) | 220 profile_path_.BaseName().LossyDisplayName()) |
224 : base::MakeUnique<RegistryHashStoreContentsWin>( | 221 : base::MakeUnique<RegistryHashStoreContentsWin>( |
225 install_static::GetRegistryPath(), | 222 install_static::GetRegistryPath(), |
226 profile_path_.BaseName().LossyDisplayName())); | 223 profile_path_.BaseName().LossyDisplayName())); |
227 #else | 224 #else |
228 return std::make_pair(nullptr, nullptr); | 225 return std::make_pair(nullptr, nullptr); |
229 #endif | 226 #endif |
230 } | 227 } |
OLD | NEW |