| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chromeos/network/network_type_pattern.h" | 27 #include "chromeos/network/network_type_pattern.h" |
| 28 #include "crypto/sha2.h" | 28 #include "crypto/sha2.h" |
| 29 #include "extensions/browser/event_router.h" | 29 #include "extensions/browser/event_router.h" |
| 30 #include "extensions/browser/extension_registry.h" | 30 #include "extensions/browser/extension_registry.h" |
| 31 #include "third_party/cros_system_api/dbus/service_constants.h" | 31 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 32 | 32 |
| 33 namespace chromeos { | 33 namespace chromeos { |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 namespace api_vpn = extensions::core_api::vpn_provider; | 37 namespace api_vpn = extensions::api::vpn_provider; |
| 38 | 38 |
| 39 void DoNothingFailureCallback(const std::string& error_name, | 39 void DoNothingFailureCallback(const std::string& error_name, |
| 40 const std::string& error_message) { | 40 const std::string& error_message) { |
| 41 LOG(ERROR) << error_name << ": " << error_message; | 41 LOG(ERROR) << error_name << ": " << error_message; |
| 42 } | 42 } |
| 43 | 43 |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| 46 class VpnService::VpnConfiguration : public ShillThirdPartyVpnObserver { | 46 class VpnService::VpnConfiguration : public ShillThirdPartyVpnObserver { |
| 47 public: | 47 public: |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 delete configuration; | 561 delete configuration; |
| 562 } | 562 } |
| 563 | 563 |
| 564 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( | 564 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( |
| 565 const std::string& extension_id) { | 565 const std::string& extension_id) { |
| 566 return active_configuration_ && | 566 return active_configuration_ && |
| 567 active_configuration_->extension_id() == extension_id; | 567 active_configuration_->extension_id() == extension_id; |
| 568 } | 568 } |
| 569 | 569 |
| 570 } // namespace chromeos | 570 } // namespace chromeos |
| OLD | NEW |