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

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

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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.h" 5 #include "chrome/browser/prefs/pref_service_syncable.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/default_pref_store.h" 9 #include "base/prefs/default_pref_store.h"
10 #include "base/prefs/overlay_user_pref_store.h" 10 #include "base/prefs/overlay_user_pref_store.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl(); 84 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
85 OverlayUserPrefStore* incognito_pref_store = 85 OverlayUserPrefStore* incognito_pref_store =
86 new OverlayUserPrefStore(user_pref_store_.get()); 86 new OverlayUserPrefStore(user_pref_store_.get());
87 PrefsTabHelper::InitIncognitoUserPrefStore(incognito_pref_store); 87 PrefsTabHelper::InitIncognitoUserPrefStore(incognito_pref_store);
88 88
89 scoped_refptr<user_prefs::PrefRegistrySyncable> forked_registry = 89 scoped_refptr<user_prefs::PrefRegistrySyncable> forked_registry =
90 static_cast<user_prefs::PrefRegistrySyncable*>( 90 static_cast<user_prefs::PrefRegistrySyncable*>(
91 pref_registry_.get())->ForkForIncognito(); 91 pref_registry_.get())->ForkForIncognito();
92 PrefServiceSyncable* incognito_service = new PrefServiceSyncable( 92 PrefServiceSyncable* incognito_service = new PrefServiceSyncable(
93 pref_notifier, 93 pref_notifier,
94 pref_value_store_->CloneAndSpecialize( 94 pref_value_store_->CloneAndSpecialize(NULL, // managed
95 NULL, // managed 95 incognito_extension_prefs,
96 incognito_extension_prefs, 96 NULL, // command_line_prefs
97 NULL, // command_line_prefs 97 incognito_pref_store,
98 incognito_pref_store, 98 NULL, // recommended
99 NULL, // recommended 99 forked_registry->defaults(),
100 forked_registry->defaults(), 100 pref_notifier),
101 pref_notifier),
102 incognito_pref_store, 101 incognito_pref_store,
103 forked_registry, 102 forked_registry.get(),
104 read_error_callback_, 103 read_error_callback_,
105 false); 104 false);
106 return incognito_service; 105 return incognito_service;
107 } 106 }
108 107
109 bool PrefServiceSyncable::IsSyncing() { 108 bool PrefServiceSyncable::IsSyncing() {
110 return pref_sync_associator_.models_associated(); 109 return pref_sync_associator_.models_associated();
111 } 110 }
112 111
113 bool PrefServiceSyncable::IsPrioritySyncing() { 112 bool PrefServiceSyncable::IsPrioritySyncing() {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 163
165 void PrefServiceSyncable::OnIsSyncingChanged() { 164 void PrefServiceSyncable::OnIsSyncingChanged() {
166 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_, 165 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_,
167 OnIsSyncingChanged()); 166 OnIsSyncingChanged());
168 } 167 }
169 168
170 void PrefServiceSyncable::ProcessPrefChange(const std::string& name) { 169 void PrefServiceSyncable::ProcessPrefChange(const std::string& name) {
171 pref_sync_associator_.ProcessPrefChange(name); 170 pref_sync_associator_.ProcessPrefChange(name);
172 priority_pref_sync_associator_.ProcessPrefChange(name); 171 priority_pref_sync_associator_.ProcessPrefChange(name);
173 } 172 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_unittest.cc ('k') | chrome/browser/prefs/proxy_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698