OLD | NEW |
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 "chrome/browser/chromeos/profiles/profile_helper.h" | 8 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
11 #include "chromeos/network/network_handler.h" | 11 #include "chromeos/network/network_handler.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/api/vpn_provider/vpn_service.h" | 13 #include "extensions/browser/api/vpn_provider/vpn_service.h" |
14 #include "extensions/browser/event_router.h" | 14 #include "extensions/browser/event_router.h" |
15 #include "extensions/browser/extension_registry.h" | 15 #include "extensions/browser/extension_registry.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
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 18 matching lines...) Expand all Loading... |
57 Profile::FromBrowserContext(context)), | 57 Profile::FromBrowserContext(context)), |
58 extensions::ExtensionRegistry::Get(context), | 58 extensions::ExtensionRegistry::Get(context), |
59 extensions::EventRouter::Get(context), | 59 extensions::EventRouter::Get(context), |
60 DBusThreadManager::Get()->GetShillThirdPartyVpnDriverClient(), | 60 DBusThreadManager::Get()->GetShillThirdPartyVpnDriverClient(), |
61 NetworkHandler::Get()->network_configuration_handler(), | 61 NetworkHandler::Get()->network_configuration_handler(), |
62 NetworkHandler::Get()->network_profile_handler(), | 62 NetworkHandler::Get()->network_profile_handler(), |
63 NetworkHandler::Get()->network_state_handler()); | 63 NetworkHandler::Get()->network_state_handler()); |
64 } | 64 } |
65 | 65 |
66 } // namespace chromeos | 66 } // namespace chromeos |
OLD | NEW |