| 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 #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ |
| 6 #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ | 6 #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 void SendPacket(const std::string& extension_id, | 136 void SendPacket(const std::string& extension_id, |
| 137 const std::vector<char>& data, | 137 const std::vector<char>& data, |
| 138 const SuccessCallback& success, | 138 const SuccessCallback& success, |
| 139 const FailureCallback& failure); | 139 const FailureCallback& failure); |
| 140 | 140 |
| 141 // Notifies connection state |state| to the active VPN configuration after | 141 // Notifies connection state |state| to the active VPN configuration after |
| 142 // verifying that it belongs to the extension with id |extension_id|. | 142 // verifying that it belongs to the extension with id |extension_id|. |
| 143 // Calls |success| or |failure| based on the outcome. | 143 // Calls |success| or |failure| based on the outcome. |
| 144 void NotifyConnectionStateChanged( | 144 void NotifyConnectionStateChanged( |
| 145 const std::string& extension_id, | 145 const std::string& extension_id, |
| 146 extensions::core_api::vpn_provider::VpnConnectionState state, | 146 extensions::api::vpn_provider::VpnConnectionState state, |
| 147 const SuccessCallback& success, | 147 const SuccessCallback& success, |
| 148 const FailureCallback& failure); | 148 const FailureCallback& failure); |
| 149 | 149 |
| 150 // Verifies if a configuration with name |configuration_name| exists for the | 150 // Verifies if a configuration with name |configuration_name| exists for the |
| 151 // extension with id |extension_id|. | 151 // extension with id |extension_id|. |
| 152 bool VerifyConfigExistsForTesting(const std::string& extension_id, | 152 bool VerifyConfigExistsForTesting(const std::string& extension_id, |
| 153 const std::string& configuration_name); | 153 const std::string& configuration_name); |
| 154 | 154 |
| 155 // Verifies if the extension has a configuration that is connected. | 155 // Verifies if the extension has a configuration that is connected. |
| 156 bool VerifyConfigIsConnectedForTesting(const std::string& extension_id); | 156 bool VerifyConfigIsConnectedForTesting(const std::string& extension_id); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 StringToConfigurationMap service_path_to_configuration_map_; | 241 StringToConfigurationMap service_path_to_configuration_map_; |
| 242 | 242 |
| 243 base::WeakPtrFactory<VpnService> weak_factory_; | 243 base::WeakPtrFactory<VpnService> weak_factory_; |
| 244 | 244 |
| 245 DISALLOW_COPY_AND_ASSIGN(VpnService); | 245 DISALLOW_COPY_AND_ASSIGN(VpnService); |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 } // namespace chromeos | 248 } // namespace chromeos |
| 249 | 249 |
| 250 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ | 250 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ |
| OLD | NEW |