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

Side by Side Diff: chrome/browser/ui/gesture_prefs_observer_factory_aura.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/gesture_prefs_observer_factory_aura.h" 5 #include "chrome/browser/ui/gesture_prefs_observer_factory_aura.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 service->Notify(chrome::NOTIFICATION_BROWSER_FLING_CURVE_PARAMETERS_CHANGED, 176 service->Notify(chrome::NOTIFICATION_BROWSER_FLING_CURVE_PARAMETERS_CHANGED,
177 content::Source<GesturePrefsObserver>(this), 177 content::Source<GesturePrefsObserver>(this),
178 content::NotificationService::NoDetails()); 178 content::NotificationService::NoDetails());
179 } 179 }
180 180
181 } // namespace 181 } // namespace
182 182
183 // static 183 // static
184 GesturePrefsObserverFactoryAura* 184 GesturePrefsObserverFactoryAura*
185 GesturePrefsObserverFactoryAura::GetInstance() { 185 GesturePrefsObserverFactoryAura::GetInstance() {
186 return Singleton<GesturePrefsObserverFactoryAura>::get(); 186 return base::Singleton<GesturePrefsObserverFactoryAura>::get();
187 } 187 }
188 188
189 GesturePrefsObserverFactoryAura::GesturePrefsObserverFactoryAura() 189 GesturePrefsObserverFactoryAura::GesturePrefsObserverFactoryAura()
190 : BrowserContextKeyedServiceFactory( 190 : BrowserContextKeyedServiceFactory(
191 "GesturePrefsObserverAura", 191 "GesturePrefsObserverAura",
192 BrowserContextDependencyManager::GetInstance()) {} 192 BrowserContextDependencyManager::GetInstance()) {}
193 193
194 GesturePrefsObserverFactoryAura::~GesturePrefsObserverFactoryAura() {} 194 GesturePrefsObserverFactoryAura::~GesturePrefsObserverFactoryAura() {}
195 195
196 KeyedService* GesturePrefsObserverFactoryAura::BuildServiceInstanceFor( 196 KeyedService* GesturePrefsObserverFactoryAura::BuildServiceInstanceFor(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // Use same gesture preferences on incognito windows. 240 // Use same gesture preferences on incognito windows.
241 return chrome::GetBrowserContextRedirectedInIncognito(context); 241 return chrome::GetBrowserContextRedirectedInIncognito(context);
242 } 242 }
243 243
244 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const { 244 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const {
245 // Some tests replace the PrefService of the TestingProfile after the 245 // Some tests replace the PrefService of the TestingProfile after the
246 // GesturePrefsObserver has been created, which makes Shutdown() 246 // GesturePrefsObserver has been created, which makes Shutdown()
247 // remove the registrar from a non-existent PrefService. 247 // remove the registrar from a non-existent PrefService.
248 return true; 248 return true;
249 } 249 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gesture_prefs_observer_factory_aura.h ('k') | chrome/browser/ui/global_error/global_error_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698