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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/prefs/json_pref_store.h" | 13 #include "base/prefs/json_pref_store.h" |
14 #include "base/prefs/persistent_pref_store.h" | 14 #include "base/prefs/persistent_pref_store.h" |
15 #include "base/prefs/pref_registry_simple.h" | 15 #include "base/prefs/pref_registry_simple.h" |
16 #include "base/sequenced_task_runner.h" | 16 #include "base/sequenced_task_runner.h" |
17 #include "chrome/browser/prefs/tracked/pref_hash_store_impl.h" | |
18 #include "chrome/browser/prefs/tracked/pref_service_hash_store_contents.h" | |
19 #include "chrome/browser/prefs/tracked/segregated_pref_store.h" | |
20 #include "chrome/browser/prefs/tracked/tracked_preferences_migration.h" | |
21 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
22 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
23 #include "components/pref_registry/pref_registry_syncable.h" | 19 #include "components/pref_registry/pref_registry_syncable.h" |
| 20 #include "components/user_prefs/tracked/pref_hash_store_impl.h" |
| 21 #include "components/user_prefs/tracked/pref_service_hash_store_contents.h" |
| 22 #include "components/user_prefs/tracked/segregated_pref_store.h" |
| 23 #include "components/user_prefs/tracked/tracked_preferences_migration.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 void RemoveValueSilently(const base::WeakPtr<JsonPrefStore> pref_store, | 27 void RemoveValueSilently(const base::WeakPtr<JsonPrefStore> pref_store, |
28 const std::string& key) { | 28 const std::string& key) { |
29 if (pref_store) { | 29 if (pref_store) { |
30 pref_store->RemoveValueSilently( | 30 pref_store->RemoveValueSilently( |
31 key, WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); | 31 key, WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); |
32 } | 32 } |
33 } | 33 } |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 232 |
233 scoped_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore( | 233 scoped_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore( |
234 bool use_super_mac) { | 234 bool use_super_mac) { |
235 DCHECK(kPlatformSupportsPreferenceTracking); | 235 DCHECK(kPlatformSupportsPreferenceTracking); |
236 | 236 |
237 return scoped_ptr<PrefHashStore>(new PrefHashStoreImpl( | 237 return scoped_ptr<PrefHashStore>(new PrefHashStoreImpl( |
238 seed_, | 238 seed_, |
239 device_id_, | 239 device_id_, |
240 use_super_mac)); | 240 use_super_mac)); |
241 } | 241 } |
OLD | NEW |