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 CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // Clears the last_error value for the NetworkState for |service_path|. | 218 // Clears the last_error value for the NetworkState for |service_path|. |
219 void ClearLastErrorForNetwork(const std::string& service_path); | 219 void ClearLastErrorForNetwork(const std::string& service_path); |
220 | 220 |
221 // Sets the list of devices on which portal check is enabled. | 221 // Sets the list of devices on which portal check is enabled. |
222 void SetCheckPortalList(const std::string& check_portal_list); | 222 void SetCheckPortalList(const std::string& check_portal_list); |
223 | 223 |
224 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we | 224 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we |
225 // only set it. | 225 // only set it. |
226 void SetWakeOnLanEnabled(bool enabled); | 226 void SetWakeOnLanEnabled(bool enabled); |
227 | 227 |
228 // Enable or disable network bandwidth throttling, on all interfaces on the | |
229 // system. If |enabled| is true, |upload_rate_kbits| and |download_rate_kbits| | |
230 // are the desired rates (in kbits/s) to throttle to. If |enabled| is false, | |
231 // throttling is off, and the rates are ignored. | |
232 void SetNetworkThrottlingStatus(bool enabled, | |
233 uint32_t upload_rate_kbits, | |
234 uint32_t download_rate_kbits); | |
235 | |
236 const std::string& GetCheckPortalListForTest() const { | 228 const std::string& GetCheckPortalListForTest() const { |
237 return check_portal_list_; | 229 return check_portal_list_; |
238 } | 230 } |
239 | 231 |
240 // Returns the NetworkState of the EthernetEAP service, which contains the | 232 // Returns the NetworkState of the EthernetEAP service, which contains the |
241 // EAP parameters used by the ethernet with |service_path|. If |service_path| | 233 // EAP parameters used by the ethernet with |service_path|. If |service_path| |
242 // doesn't refer to an ethernet service or if the ethernet service is not | 234 // doesn't refer to an ethernet service or if the ethernet service is not |
243 // connected using EAP, returns NULL. | 235 // connected using EAP, returns NULL. |
244 const NetworkState* GetEAPForEthernet(const std::string& service_path); | 236 const NetworkState* GetEAPForEthernet(const std::string& service_path); |
245 | 237 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 401 |
410 // Ensure that Shutdown() gets called exactly once. | 402 // Ensure that Shutdown() gets called exactly once. |
411 bool did_shutdown_ = false; | 403 bool did_shutdown_ = false; |
412 | 404 |
413 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); | 405 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); |
414 }; | 406 }; |
415 | 407 |
416 } // namespace chromeos | 408 } // namespace chromeos |
417 | 409 |
418 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 410 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
OLD | NEW |