| 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.h" | 5 #include "extensions/browser/api/vpn_provider/vpn_service.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 if (reason == extensions::UnloadedExtensionInfo::REASON_DISABLE || | 488 if (reason == extensions::UnloadedExtensionInfo::REASON_DISABLE || |
| 489 reason == extensions::UnloadedExtensionInfo::REASON_BLACKLIST) { | 489 reason == extensions::UnloadedExtensionInfo::REASON_BLACKLIST) { |
| 490 DestroyConfigurationsForExtension(extension); | 490 DestroyConfigurationsForExtension(extension); |
| 491 } | 491 } |
| 492 } | 492 } |
| 493 | 493 |
| 494 void VpnService::OnCreateConfigurationSuccess( | 494 void VpnService::OnCreateConfigurationSuccess( |
| 495 const VpnService::SuccessCallback& callback, | 495 const VpnService::SuccessCallback& callback, |
| 496 VpnConfiguration* configuration, | 496 VpnConfiguration* configuration, |
| 497 const std::string& service_path) { | 497 const std::string& service_path, |
| 498 const std::string& guid) { |
| 498 configuration->set_service_path(service_path); | 499 configuration->set_service_path(service_path); |
| 499 service_path_to_configuration_map_[service_path] = configuration; | 500 service_path_to_configuration_map_[service_path] = configuration; |
| 500 shill_client_->AddShillThirdPartyVpnObserver(configuration->object_path(), | 501 shill_client_->AddShillThirdPartyVpnObserver(configuration->object_path(), |
| 501 configuration); | 502 configuration); |
| 502 callback.Run(); | 503 callback.Run(); |
| 503 } | 504 } |
| 504 | 505 |
| 505 void VpnService::OnCreateConfigurationFailure( | 506 void VpnService::OnCreateConfigurationFailure( |
| 506 const VpnService::FailureCallback& callback, | 507 const VpnService::FailureCallback& callback, |
| 507 VpnConfiguration* configuration, | 508 VpnConfiguration* configuration, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 delete configuration; | 564 delete configuration; |
| 564 } | 565 } |
| 565 | 566 |
| 566 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( | 567 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( |
| 567 const std::string& extension_id) { | 568 const std::string& extension_id) { |
| 568 return active_configuration_ && | 569 return active_configuration_ && |
| 569 active_configuration_->extension_id() == extension_id; | 570 active_configuration_->extension_id() == extension_id; |
| 570 } | 571 } |
| 571 | 572 |
| 572 } // namespace chromeos | 573 } // namespace chromeos |
| OLD | NEW |