OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_ |
7 | 7 |
8 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" | 8 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 virtual void SetIPParameters(const std::string& service_path, | 86 virtual void SetIPParameters(const std::string& service_path, |
87 const std::string& address, | 87 const std::string& address, |
88 const std::string& netmask, | 88 const std::string& netmask, |
89 const std::string& gateway, | 89 const std::string& gateway, |
90 const std::string& name_servers, | 90 const std::string& name_servers, |
91 int dhcp_usage_mask) OVERRIDE; | 91 int dhcp_usage_mask) OVERRIDE; |
92 virtual void RequestNetworkServiceProperties( | 92 virtual void RequestNetworkServiceProperties( |
93 const std::string& service_path, | 93 const std::string& service_path, |
94 const NetworkServicePropertiesCallback& callback) OVERRIDE; | 94 const NetworkServicePropertiesCallback& callback) OVERRIDE; |
95 | 95 |
| 96 // For testing only: |
| 97 // Returns the configurations applied in LoadOncNetworks. The key is the |
| 98 // network's service path which is mapped to the Shill dictionary. |
| 99 const std::map<std::string, base::DictionaryValue*>& GetConfigurations(); |
| 100 |
96 private: | 101 private: |
97 void AddStubNetwork(Network* network, NetworkProfileType profile_type); | 102 void AddStubNetwork(Network* network, NetworkProfileType profile_type); |
98 void AddStubRememberedNetwork(Network* network); | 103 void AddStubRememberedNetwork(Network* network); |
99 void ConnectToNetwork(Network* network); | 104 void ConnectToNetwork(Network* network); |
100 void ScanCompleted(); | 105 void ScanCompleted(); |
101 void SendNetworkServiceProperties( | 106 void SendNetworkServiceProperties( |
102 const std::string& service_path, | 107 const std::string& service_path, |
103 const NetworkServicePropertiesCallback& callback); | 108 const NetworkServicePropertiesCallback& callback); |
104 | 109 |
105 std::string ip_address_; | 110 std::string ip_address_; |
106 std::string hardware_address_; | 111 std::string hardware_address_; |
107 NetworkIPConfigVector ip_configs_; | 112 NetworkIPConfigVector ip_configs_; |
108 std::string pin_; | 113 std::string pin_; |
109 bool pin_required_; | 114 bool pin_required_; |
110 bool pin_entered_; | 115 bool pin_entered_; |
111 int64 connect_delay_ms_; | 116 int64 connect_delay_ms_; |
112 int network_priority_order_; | 117 int network_priority_order_; |
113 WifiNetworkVector disabled_wifi_networks_; | 118 WifiNetworkVector disabled_wifi_networks_; |
114 CellularNetworkVector disabled_cellular_networks_; | 119 CellularNetworkVector disabled_cellular_networks_; |
115 WimaxNetworkVector disabled_wimax_networks_; | 120 WimaxNetworkVector disabled_wimax_networks_; |
| 121 std::map<std::string, base::DictionaryValue*> service_configurations_; |
116 | 122 |
117 DISALLOW_COPY_AND_ASSIGN(NetworkLibraryImplStub); | 123 DISALLOW_COPY_AND_ASSIGN(NetworkLibraryImplStub); |
118 }; | 124 }; |
119 | 125 |
120 } // namespace chromeos | 126 } // namespace chromeos |
121 | 127 |
122 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_ | 128 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_ |
OLD | NEW |