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

Side by Side Diff: chrome/browser/extensions/api/search_engines_private/search_engines_private_event_router_factory.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extensions/api/search_engines_private/search_engines_pr ivate_event_router.h" 5 #include "chrome/browser/extensions/api/search_engines_private/search_engines_pr ivate_event_router.h"
6 #include "chrome/browser/extensions/api/search_engines_private/search_engines_pr ivate_event_router_factory.h" 6 #include "chrome/browser/extensions/api/search_engines_private/search_engines_pr ivate_event_router_factory.h"
7 #include "components/keyed_service/content/browser_context_dependency_manager.h" 7 #include "components/keyed_service/content/browser_context_dependency_manager.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "extensions/browser/extension_system_provider.h" 9 #include "extensions/browser/extension_system_provider.h"
10 #include "extensions/browser/extensions_browser_client.h" 10 #include "extensions/browser/extensions_browser_client.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 // static 14 // static
15 SearchEnginesPrivateEventRouter* 15 SearchEnginesPrivateEventRouter*
16 SearchEnginesPrivateEventRouterFactory::GetForProfile( 16 SearchEnginesPrivateEventRouterFactory::GetForProfile(
17 content::BrowserContext* context) { 17 content::BrowserContext* context) {
18 return static_cast<SearchEnginesPrivateEventRouter*>( 18 return static_cast<SearchEnginesPrivateEventRouter*>(
19 GetInstance()->GetServiceForBrowserContext(context, true)); 19 GetInstance()->GetServiceForBrowserContext(context, true));
20 } 20 }
21 21
22 // static 22 // static
23 SearchEnginesPrivateEventRouterFactory* 23 SearchEnginesPrivateEventRouterFactory*
24 SearchEnginesPrivateEventRouterFactory::GetInstance() { 24 SearchEnginesPrivateEventRouterFactory::GetInstance() {
25 return Singleton<SearchEnginesPrivateEventRouterFactory>::get(); 25 return base::Singleton<SearchEnginesPrivateEventRouterFactory>::get();
26 } 26 }
27 27
28 SearchEnginesPrivateEventRouterFactory::SearchEnginesPrivateEventRouterFactory() 28 SearchEnginesPrivateEventRouterFactory::SearchEnginesPrivateEventRouterFactory()
29 : BrowserContextKeyedServiceFactory( 29 : BrowserContextKeyedServiceFactory(
30 "SearchEnginesPrivateEventRouter", 30 "SearchEnginesPrivateEventRouter",
31 BrowserContextDependencyManager::GetInstance()) { 31 BrowserContextDependencyManager::GetInstance()) {
32 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 32 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
33 } 33 }
34 34
35 SearchEnginesPrivateEventRouterFactory:: 35 SearchEnginesPrivateEventRouterFactory::
(...skipping 14 matching lines...) Expand all
50 bool SearchEnginesPrivateEventRouterFactory:: 50 bool SearchEnginesPrivateEventRouterFactory::
51 ServiceIsCreatedWithBrowserContext() const { 51 ServiceIsCreatedWithBrowserContext() const {
52 return true; 52 return true;
53 } 53 }
54 54
55 bool SearchEnginesPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const { 55 bool SearchEnginesPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const {
56 return false; 56 return false;
57 } 57 }
58 58
59 } // namespace extensions 59 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698