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

Side by Side Diff: extensions/shell/browser/api/vpn_provider/vpn_service_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/vpn_provider/vpn_service_factory.h" 5 #include "extensions/browser/api/vpn_provider/vpn_service_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chromeos/dbus/dbus_thread_manager.h" 8 #include "chromeos/dbus/dbus_thread_manager.h"
9 #include "chromeos/network/network_handler.h" 9 #include "chromeos/network/network_handler.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11 #include "extensions/browser/api/vpn_provider/vpn_service.h" 11 #include "extensions/browser/api/vpn_provider/vpn_service.h"
12 #include "extensions/browser/event_router.h" 12 #include "extensions/browser/event_router.h"
13 #include "extensions/browser/extension_registry.h" 13 #include "extensions/browser/extension_registry.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // This file is a dummy stub for use in appshell. 17 // This file is a dummy stub for use in appshell.
18 18
19 // static 19 // static
20 VpnService* VpnServiceFactory::GetForBrowserContext( 20 VpnService* VpnServiceFactory::GetForBrowserContext(
21 content::BrowserContext* context) { 21 content::BrowserContext* context) {
22 return static_cast<VpnService*>( 22 return static_cast<VpnService*>(
23 GetInstance()->GetServiceForBrowserContext(context, true)); 23 GetInstance()->GetServiceForBrowserContext(context, true));
24 } 24 }
25 25
26 // static 26 // static
27 VpnServiceFactory* VpnServiceFactory::GetInstance() { 27 VpnServiceFactory* VpnServiceFactory::GetInstance() {
28 return Singleton<VpnServiceFactory>::get(); 28 return base::Singleton<VpnServiceFactory>::get();
29 } 29 }
30 30
31 VpnServiceFactory::VpnServiceFactory() 31 VpnServiceFactory::VpnServiceFactory()
32 : BrowserContextKeyedServiceFactory( 32 : BrowserContextKeyedServiceFactory(
33 "VpnService", 33 "VpnService",
34 BrowserContextDependencyManager::GetInstance()) { 34 BrowserContextDependencyManager::GetInstance()) {
35 } 35 }
36 36
37 VpnServiceFactory::~VpnServiceFactory() { 37 VpnServiceFactory::~VpnServiceFactory() {
38 } 38 }
(...skipping 11 matching lines...) Expand all
50 return new VpnService( 50 return new VpnService(
51 context, "testuser", extensions::ExtensionRegistry::Get(context), 51 context, "testuser", extensions::ExtensionRegistry::Get(context),
52 extensions::EventRouter::Get(context), 52 extensions::EventRouter::Get(context),
53 DBusThreadManager::Get()->GetShillThirdPartyVpnDriverClient(), 53 DBusThreadManager::Get()->GetShillThirdPartyVpnDriverClient(),
54 NetworkHandler::Get()->network_configuration_handler(), 54 NetworkHandler::Get()->network_configuration_handler(),
55 NetworkHandler::Get()->network_profile_handler(), 55 NetworkHandler::Get()->network_profile_handler(),
56 NetworkHandler::Get()->network_state_handler()); 56 NetworkHandler::Get()->network_state_handler());
57 } 57 }
58 58
59 } // namespace chromeos 59 } // namespace chromeos
OLDNEW
« no previous file with comments | « extensions/common/extension_api.h ('k') | extensions/shell/browser/shell_extension_system_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698