| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 class VpnService::VpnConfiguration : public ShillThirdPartyVpnObserver { | 56 class VpnService::VpnConfiguration : public ShillThirdPartyVpnObserver { |
| 57 public: | 57 public: |
| 58 VpnConfiguration(const std::string& extension_id, | 58 VpnConfiguration(const std::string& extension_id, |
| 59 const std::string& configuration_name, | 59 const std::string& configuration_name, |
| 60 const std::string& key, | 60 const std::string& key, |
| 61 base::WeakPtr<VpnService> vpn_service); | 61 base::WeakPtr<VpnService> vpn_service); |
| 62 ~VpnConfiguration(); | 62 ~VpnConfiguration() override; |
| 63 | 63 |
| 64 const std::string& extension_id() const { return extension_id_; } | 64 const std::string& extension_id() const { return extension_id_; } |
| 65 const std::string& configuration_name() const { return configuration_name_; } | 65 const std::string& configuration_name() const { return configuration_name_; } |
| 66 const std::string& key() const { return key_; } | 66 const std::string& key() const { return key_; } |
| 67 const std::string& service_path() const { return service_path_; } | 67 const std::string& service_path() const { return service_path_; } |
| 68 void set_service_path(const std::string& service_path) { | 68 void set_service_path(const std::string& service_path) { |
| 69 service_path_ = service_path; | 69 service_path_ = service_path; |
| 70 } | 70 } |
| 71 const std::string& object_path() const { return object_path_; } | 71 const std::string& object_path() const { return object_path_; } |
| 72 | 72 |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 delete configuration; | 485 delete configuration; |
| 486 } | 486 } |
| 487 | 487 |
| 488 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( | 488 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( |
| 489 const std::string& extension_id) { | 489 const std::string& extension_id) { |
| 490 return active_configuration_ && | 490 return active_configuration_ && |
| 491 active_configuration_->extension_id() == extension_id; | 491 active_configuration_->extension_id() == extension_id; |
| 492 } | 492 } |
| 493 | 493 |
| 494 } // namespace chromeos | 494 } // namespace chromeos |
| OLD | NEW |