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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_factory.h" 5 #include "chrome/browser/prefs/pref_service_syncable_factory.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/prefs/default_pref_store.h" 8 #include "base/prefs/default_pref_store.h"
9 #include "base/prefs/pref_notifier_impl.h" 9 #include "base/prefs/pref_notifier_impl.h"
10 #include "base/prefs/pref_value_store.h" 10 #include "base/prefs/pref_value_store.h"
(...skipping 28 matching lines...) Expand all
39 void PrefServiceSyncableFactory::SetRecommendedPolicies( 39 void PrefServiceSyncableFactory::SetRecommendedPolicies(
40 policy::PolicyService* service) { 40 policy::PolicyService* service) {
41 set_recommended_prefs( 41 set_recommended_prefs(
42 new policy::ConfigurationPolicyPrefStore( 42 new policy::ConfigurationPolicyPrefStore(
43 service, 43 service,
44 g_browser_process->browser_policy_connector()->GetHandlerList(), 44 g_browser_process->browser_policy_connector()->GetHandlerList(),
45 policy::POLICY_LEVEL_RECOMMENDED)); 45 policy::POLICY_LEVEL_RECOMMENDED));
46 } 46 }
47 #endif 47 #endif
48 48
49 void PrefServiceSyncableFactory::SetCommandLine(CommandLine* command_line) { 49 void PrefServiceSyncableFactory::SetCommandLine(
50 base::CommandLine* command_line) {
50 set_command_line_prefs(new CommandLinePrefStore(command_line)); 51 set_command_line_prefs(new CommandLinePrefStore(command_line));
51 } 52 }
52 53
53 scoped_ptr<PrefServiceSyncable> PrefServiceSyncableFactory::CreateSyncable( 54 scoped_ptr<PrefServiceSyncable> PrefServiceSyncableFactory::CreateSyncable(
54 user_prefs::PrefRegistrySyncable* pref_registry) { 55 user_prefs::PrefRegistrySyncable* pref_registry) {
55 TRACE_EVENT0("browser", "PrefServiceSyncableFactory::CreateSyncable"); 56 TRACE_EVENT0("browser", "PrefServiceSyncableFactory::CreateSyncable");
56 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl(); 57 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
57 scoped_ptr<PrefServiceSyncable> pref_service( 58 scoped_ptr<PrefServiceSyncable> pref_service(
58 new PrefServiceSyncable( 59 new PrefServiceSyncable(
59 pref_notifier, 60 pref_notifier,
60 new PrefValueStore(managed_prefs_.get(), 61 new PrefValueStore(managed_prefs_.get(),
61 supervised_user_prefs_.get(), 62 supervised_user_prefs_.get(),
62 extension_prefs_.get(), 63 extension_prefs_.get(),
63 command_line_prefs_.get(), 64 command_line_prefs_.get(),
64 user_prefs_.get(), 65 user_prefs_.get(),
65 recommended_prefs_.get(), 66 recommended_prefs_.get(),
66 pref_registry->defaults().get(), 67 pref_registry->defaults().get(),
67 pref_notifier), 68 pref_notifier),
68 user_prefs_.get(), 69 user_prefs_.get(),
69 pref_registry, 70 pref_registry,
70 read_error_callback_, 71 read_error_callback_,
71 async_)); 72 async_));
72 return pref_service.Pass(); 73 return pref_service.Pass();
73 } 74 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_service_browsertest.cc ('k') | chrome/browser/prefs/proxy_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698