Chromium Code Reviews| 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" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 KeyedService* VpnServiceFactory::BuildServiceInstanceFor( | 48 KeyedService* VpnServiceFactory::BuildServiceInstanceFor( |
| 49 content::BrowserContext* context) const { | 49 content::BrowserContext* context) const { |
| 50 if (!chromeos::ProfileHelper::IsPrimaryProfile( | 50 if (!chromeos::ProfileHelper::IsPrimaryProfile( |
| 51 Profile::FromBrowserContext(context))) { | 51 Profile::FromBrowserContext(context))) { |
| 52 return nullptr; | 52 return nullptr; |
| 53 } | 53 } |
| 54 return new VpnService( | 54 return new VpnService( |
| 55 context, | 55 context, |
| 56 chromeos::ProfileHelper::GetUserIdHashFromProfile( | 56 chromeos::ProfileHelper::GetUserIdHashFromProfile( |
| 57 Profile::FromBrowserContext(context)), | 57 Profile::FromBrowserContext(context)), |
| 58 extensions::AppWindowRegistry::Get(context), | |
|
bartfab (slow)
2015/03/10 13:28:40
Nit: No longer needed.
| |
| 58 extensions::ExtensionRegistry::Get(context), | 59 extensions::ExtensionRegistry::Get(context), |
| 59 extensions::EventRouter::Get(context), | 60 extensions::EventRouter::Get(context), |
| 60 DBusThreadManager::Get()->GetShillThirdPartyVpnDriverClient(), | 61 DBusThreadManager::Get()->GetShillThirdPartyVpnDriverClient(), |
| 61 NetworkHandler::Get()->network_configuration_handler(), | 62 NetworkHandler::Get()->network_configuration_handler(), |
| 62 NetworkHandler::Get()->network_profile_handler(), | 63 NetworkHandler::Get()->network_profile_handler(), |
| 63 NetworkHandler::Get()->network_state_handler()); | 64 NetworkHandler::Get()->network_state_handler()); |
| 64 } | 65 } |
| 65 | 66 |
| 66 } // namespace chromeos | 67 } // namespace chromeos |
| OLD | NEW |