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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(NULL, // managed 94 pref_value_store_->CloneAndSpecialize(NULL, // managed
95 incognito_extension_prefs, 95 incognito_extension_prefs,
96 NULL, // command_line_prefs 96 NULL, // command_line_prefs
97 incognito_pref_store, 97 incognito_pref_store,
98 NULL, // recommended 98 NULL, // recommended
99 forked_registry->defaults(), 99 forked_registry->defaults().get(),
100 pref_notifier), 100 pref_notifier),
101 incognito_pref_store, 101 incognito_pref_store,
102 forked_registry.get(), 102 forked_registry.get(),
103 read_error_callback_, 103 read_error_callback_,
104 false); 104 false);
105 return incognito_service; 105 return incognito_service;
106 } 106 }
107 107
108 bool PrefServiceSyncable::IsSyncing() { 108 bool PrefServiceSyncable::IsSyncing() {
109 return pref_sync_associator_.models_associated(); 109 return pref_sync_associator_.models_associated();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 void PrefServiceSyncable::OnIsSyncingChanged() { 164 void PrefServiceSyncable::OnIsSyncingChanged() {
165 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_, 165 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_,
166 OnIsSyncingChanged()); 166 OnIsSyncingChanged());
167 } 167 }
168 168
169 void PrefServiceSyncable::ProcessPrefChange(const std::string& name) { 169 void PrefServiceSyncable::ProcessPrefChange(const std::string& name) {
170 pref_sync_associator_.ProcessPrefChange(name); 170 pref_sync_associator_.ProcessPrefChange(name);
171 priority_pref_sync_associator_.ProcessPrefChange(name); 171 priority_pref_sync_associator_.ProcessPrefChange(name);
172 } 172 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_unittest.cc ('k') | chrome/browser/prefs/pref_service_syncable_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698