| 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 |
| 228 const std::string& GetCheckPortalListForTest() const { | 236 const std::string& GetCheckPortalListForTest() const { |
| 229 return check_portal_list_; | 237 return check_portal_list_; |
| 230 } | 238 } |
| 231 | 239 |
| 232 // Returns the NetworkState of the EthernetEAP service, which contains the | 240 // Returns the NetworkState of the EthernetEAP service, which contains the |
| 233 // EAP parameters used by the ethernet with |service_path|. If |service_path| | 241 // EAP parameters used by the ethernet with |service_path|. If |service_path| |
| 234 // doesn't refer to an ethernet service or if the ethernet service is not | 242 // doesn't refer to an ethernet service or if the ethernet service is not |
| 235 // connected using EAP, returns NULL. | 243 // connected using EAP, returns NULL. |
| 236 const NetworkState* GetEAPForEthernet(const std::string& service_path); | 244 const NetworkState* GetEAPForEthernet(const std::string& service_path); |
| 237 | 245 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 409 |
| 402 // Ensure that Shutdown() gets called exactly once. | 410 // Ensure that Shutdown() gets called exactly once. |
| 403 bool did_shutdown_ = false; | 411 bool did_shutdown_ = false; |
| 404 | 412 |
| 405 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); | 413 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); |
| 406 }; | 414 }; |
| 407 | 415 |
| 408 } // namespace chromeos | 416 } // namespace chromeos |
| 409 | 417 |
| 410 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 418 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
| OLD | NEW |