| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/mus/system_tray_delegate_mus.h" | 5 #include "ash/mus/system_tray_delegate_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/system/networking_config_delegate.h" | 7 #include "ash/common/system/networking_config_delegate.h" |
| 8 #include "ash/mus/vpn_delegate_mus.h" |
| 8 | 9 |
| 9 namespace ash { | 10 namespace ash { |
| 10 namespace { | 11 namespace { |
| 11 | 12 |
| 12 // TODO(mash): Provide a real implementation, perhaps by folding its behavior | 13 // TODO(mash): Provide a real implementation, perhaps by folding its behavior |
| 13 // into an ash-side network information cache. http://crbug.com/651157 | 14 // into an ash-side network information cache. http://crbug.com/651157 |
| 14 class StubNetworkingConfigDelegate : public NetworkingConfigDelegate { | 15 class StubNetworkingConfigDelegate : public NetworkingConfigDelegate { |
| 15 public: | 16 public: |
| 16 StubNetworkingConfigDelegate() {} | 17 StubNetworkingConfigDelegate() {} |
| 17 ~StubNetworkingConfigDelegate() override {} | 18 ~StubNetworkingConfigDelegate() override {} |
| 18 | 19 |
| 19 private: | 20 private: |
| 20 // NetworkingConfigDelegate: | 21 // NetworkingConfigDelegate: |
| 21 std::unique_ptr<const ExtensionInfo> LookUpExtensionForNetwork( | 22 std::unique_ptr<const ExtensionInfo> LookUpExtensionForNetwork( |
| 22 const std::string& service_path) override { | 23 const std::string& service_path) override { |
| 23 return nullptr; | 24 return nullptr; |
| 24 } | 25 } |
| 25 | 26 |
| 26 DISALLOW_COPY_AND_ASSIGN(StubNetworkingConfigDelegate); | 27 DISALLOW_COPY_AND_ASSIGN(StubNetworkingConfigDelegate); |
| 27 }; | 28 }; |
| 28 | 29 |
| 29 } // namespace | 30 } // namespace |
| 30 | 31 |
| 31 SystemTrayDelegateMus::SystemTrayDelegateMus() | 32 SystemTrayDelegateMus::SystemTrayDelegateMus() |
| 32 : networking_config_delegate_(new StubNetworkingConfigDelegate) {} | 33 : networking_config_delegate_(new StubNetworkingConfigDelegate), |
| 34 vpn_delegate_(new VPNDelegateMus) {} |
| 33 | 35 |
| 34 SystemTrayDelegateMus::~SystemTrayDelegateMus() { | 36 SystemTrayDelegateMus::~SystemTrayDelegateMus() { |
| 35 } | 37 } |
| 36 | 38 |
| 37 NetworkingConfigDelegate* SystemTrayDelegateMus::GetNetworkingConfigDelegate() | 39 NetworkingConfigDelegate* SystemTrayDelegateMus::GetNetworkingConfigDelegate() |
| 38 const { | 40 const { |
| 39 return networking_config_delegate_.get(); | 41 return networking_config_delegate_.get(); |
| 40 } | 42 } |
| 41 | 43 |
| 44 VPNDelegate* SystemTrayDelegateMus::GetVPNDelegate() const { |
| 45 return vpn_delegate_.get(); |
| 46 } |
| 47 |
| 42 } // namespace ash | 48 } // namespace ash |
| OLD | NEW |