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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to desired interfaces. Created 7 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pref_service_syncable_builder.h" 5 #include "chrome/browser/prefs/pref_service_syncable_builder.h"
6 6
7 #include "base/prefs/default_pref_store.h" 7 #include "base/prefs/default_pref_store.h"
8 #include "chrome/browser/policy/configuration_policy_pref_store.h" 8 #include "chrome/browser/policy/configuration_policy_pref_store.h"
9 #include "chrome/browser/policy/policy_service.h" 9 #include "chrome/browser/policy/policy_service.h"
10 #include "chrome/browser/prefs/command_line_pref_store.h" 10 #include "chrome/browser/prefs/command_line_pref_store.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 #endif 35 #endif
36 36
37 PrefServiceSyncableBuilder& 37 PrefServiceSyncableBuilder&
38 PrefServiceSyncableBuilder::WithCommandLine(CommandLine* command_line) { 38 PrefServiceSyncableBuilder::WithCommandLine(CommandLine* command_line) {
39 WithCommandLinePrefs(new CommandLinePrefStore(command_line)); 39 WithCommandLinePrefs(new CommandLinePrefStore(command_line));
40 return *this; 40 return *this;
41 } 41 }
42 42
43 PrefServiceSyncable* PrefServiceSyncableBuilder::CreateSyncable() { 43 PrefServiceSyncable* PrefServiceSyncableBuilder::CreateSyncable() {
44 DefaultPrefStore* default_pref_store = new DefaultPrefStore(); 44 PrefRegistry* pref_registry = new PrefRegistry();
45 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl(); 45 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
46 PrefServiceSyncable* pref_service = new PrefServiceSyncable( 46 PrefServiceSyncable* pref_service = new PrefServiceSyncable(
47 pref_notifier, 47 pref_notifier,
48 new PrefValueStore( 48 new PrefValueStore(
49 managed_prefs_.get(), 49 managed_prefs_.get(),
50 extension_prefs_.get(), 50 extension_prefs_.get(),
51 command_line_prefs_.get(), 51 command_line_prefs_.get(),
52 user_prefs_.get(), 52 user_prefs_.get(),
53 recommended_prefs_.get(), 53 recommended_prefs_.get(),
54 default_pref_store, 54 pref_registry,
55 pref_notifier), 55 pref_notifier),
56 user_prefs_.get(), 56 user_prefs_.get(),
57 default_pref_store, 57 make_scoped_ptr(pref_registry).Pass(),
58 read_error_callback_, 58 read_error_callback_,
59 async_); 59 async_);
60 ResetDefaultState(); 60 ResetDefaultState();
61 return pref_service; 61 return pref_service;
62 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698