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

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

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 #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/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/prefs/json_pref_store.h" 12 #include "base/prefs/json_pref_store.h"
13 #include "base/prefs/persistent_pref_store.h" 13 #include "base/prefs/persistent_pref_store.h"
14 #include "base/prefs/pref_registry_simple.h" 14 #include "base/prefs/pref_registry_simple.h"
15 #include "chrome/browser/prefs/pref_hash_store_impl.h" 15 #include "chrome/browser/prefs/pref_hash_store_impl.h"
16 #include "chrome/browser/prefs/tracked/pref_service_hash_store_contents.h" 16 #include "chrome/browser/prefs/tracked/pref_service_hash_store_contents.h"
17 #include "chrome/browser/prefs/tracked/segregated_pref_store.h" 17 #include "chrome/browser/prefs/tracked/segregated_pref_store.h"
18 #include "chrome/browser/prefs/tracked/tracked_preferences_migration.h" 18 #include "chrome/browser/prefs/tracked/tracked_preferences_migration.h"
19 #include "chrome/common/chrome_constants.h" 19 #include "chrome/common/chrome_constants.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "components/user_prefs/pref_registry_syncable.h" 21 #include "components/pref_registry/pref_registry_syncable.h"
22 22
23 namespace { 23 namespace {
24 24
25 // An adaptor that allows a PrefHashStoreImpl to access a preference store 25 // An adaptor that allows a PrefHashStoreImpl to access a preference store
26 // directly as a dictionary. Uses an equivalent layout to 26 // directly as a dictionary. Uses an equivalent layout to
27 // PrefStoreHashStoreContents. 27 // PrefStoreHashStoreContents.
28 class DictionaryHashStoreContents : public HashStoreContents { 28 class DictionaryHashStoreContents : public HashStoreContents {
29 public: 29 public:
30 // Instantiates a HashStoreContents that is a copy of |to_copy|. The copy is 30 // Instantiates a HashStoreContents that is a copy of |to_copy|. The copy is
31 // mutable but does not affect the original, nor is it persisted to disk in 31 // mutable but does not affect the original, nor is it persisted to disk in
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 401
402 scoped_ptr<PrefHashStoreImpl> ProfilePrefStoreManager::GetPrefHashStoreImpl() { 402 scoped_ptr<PrefHashStoreImpl> ProfilePrefStoreManager::GetPrefHashStoreImpl() {
403 DCHECK(kPlatformSupportsPreferenceTracking); 403 DCHECK(kPlatformSupportsPreferenceTracking);
404 404
405 return make_scoped_ptr(new PrefHashStoreImpl( 405 return make_scoped_ptr(new PrefHashStoreImpl(
406 seed_, 406 seed_,
407 device_id_, 407 device_id_,
408 scoped_ptr<HashStoreContents>(new PrefServiceHashStoreContents( 408 scoped_ptr<HashStoreContents>(new PrefServiceHashStoreContents(
409 profile_path_.AsUTF8Unsafe(), local_state_)))); 409 profile_path_.AsUTF8Unsafe(), local_state_))));
410 } 410 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/prefs_syncable_service_unittest.cc ('k') | chrome/browser/prefs/profile_pref_store_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698