| 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" |
| 11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/json/json_file_value_serializer.h" | 12 #include "base/json/json_file_value_serializer.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 15 #include "base/prefs/json_pref_store.h" | |
| 16 #include "base/prefs/persistent_pref_store.h" | |
| 17 #include "base/prefs/pref_registry_simple.h" | |
| 18 #include "base/sequenced_task_runner.h" | 15 #include "base/sequenced_task_runner.h" |
| 19 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 20 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
| 21 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
| 19 #include "components/prefs/json_pref_store.h" |
| 20 #include "components/prefs/persistent_pref_store.h" |
| 21 #include "components/prefs/pref_registry_simple.h" |
| 22 #include "components/user_prefs/tracked/pref_hash_store_impl.h" | 22 #include "components/user_prefs/tracked/pref_hash_store_impl.h" |
| 23 #include "components/user_prefs/tracked/pref_service_hash_store_contents.h" | 23 #include "components/user_prefs/tracked/pref_service_hash_store_contents.h" |
| 24 #include "components/user_prefs/tracked/segregated_pref_store.h" | 24 #include "components/user_prefs/tracked/segregated_pref_store.h" |
| 25 #include "components/user_prefs/tracked/tracked_preferences_migration.h" | 25 #include "components/user_prefs/tracked/tracked_preferences_migration.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 void RemoveValueSilently(const base::WeakPtr<JsonPrefStore> pref_store, | 29 void RemoveValueSilently(const base::WeakPtr<JsonPrefStore> pref_store, |
| 30 const std::string& key) { | 30 const std::string& key) { |
| 31 if (pref_store) { | 31 if (pref_store) { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 scoped_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore( | 223 scoped_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore( |
| 224 bool use_super_mac) { | 224 bool use_super_mac) { |
| 225 DCHECK(kPlatformSupportsPreferenceTracking); | 225 DCHECK(kPlatformSupportsPreferenceTracking); |
| 226 | 226 |
| 227 return scoped_ptr<PrefHashStore>(new PrefHashStoreImpl( | 227 return scoped_ptr<PrefHashStore>(new PrefHashStoreImpl( |
| 228 seed_, | 228 seed_, |
| 229 device_id_, | 229 device_id_, |
| 230 use_super_mac)); | 230 use_super_mac)); |
| 231 } | 231 } |
| OLD | NEW |