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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/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 (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/chromeos/extensions/file_manager/event_router_factory.h " 5 #include "chrome/browser/chromeos/extensions/file_manager/event_router_factory.h "
6 6
7 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 7 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
8 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" 8 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h"
9 #include "chrome/browser/chromeos/file_manager/volume_manager_factory.h" 9 #include "chrome/browser/chromeos/file_manager/volume_manager_factory.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
13 #include "extensions/browser/extension_system_provider.h" 13 #include "extensions/browser/extension_system_provider.h"
14 #include "extensions/browser/extensions_browser_client.h" 14 #include "extensions/browser/extensions_browser_client.h"
15 15
16 namespace file_manager { 16 namespace file_manager {
17 17
18 // static 18 // static
19 EventRouter* EventRouterFactory::GetForProfile(Profile* profile) { 19 EventRouter* EventRouterFactory::GetForProfile(Profile* profile) {
20 return static_cast<EventRouter*>( 20 return static_cast<EventRouter*>(
21 GetInstance()->GetServiceForBrowserContext(profile, true)); 21 GetInstance()->GetServiceForBrowserContext(profile, true));
22 } 22 }
23 23
24 // static 24 // static
25 EventRouterFactory* EventRouterFactory::GetInstance() { 25 EventRouterFactory* EventRouterFactory::GetInstance() {
26 return Singleton<EventRouterFactory>::get(); 26 return base::Singleton<EventRouterFactory>::get();
27 } 27 }
28 28
29 EventRouterFactory::EventRouterFactory() 29 EventRouterFactory::EventRouterFactory()
30 : BrowserContextKeyedServiceFactory( 30 : BrowserContextKeyedServiceFactory(
31 "EventRouter", 31 "EventRouter",
32 BrowserContextDependencyManager::GetInstance()) { 32 BrowserContextDependencyManager::GetInstance()) {
33 DependsOn(drive::DriveIntegrationServiceFactory::GetInstance()); 33 DependsOn(drive::DriveIntegrationServiceFactory::GetInstance());
34 DependsOn( 34 DependsOn(
35 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 35 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
36 DependsOn(VolumeManagerFactory::GetInstance()); 36 DependsOn(VolumeManagerFactory::GetInstance());
(...skipping 15 matching lines...) Expand all
52 52
53 bool EventRouterFactory::ServiceIsCreatedWithBrowserContext() const { 53 bool EventRouterFactory::ServiceIsCreatedWithBrowserContext() const {
54 return true; 54 return true;
55 } 55 }
56 56
57 bool EventRouterFactory::ServiceIsNULLWhileTesting() const { 57 bool EventRouterFactory::ServiceIsNULLWhileTesting() const {
58 return true; 58 return true;
59 } 59 }
60 60
61 } // namespace file_manager 61 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698