Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: chromeos/network/shill_property_handler.h

Issue 2466693002: [Re-land] Add network throttling as enterprise policy (Closed)
Patch Set: [Re-land] Add network throttling as enterprise policy Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SHILL_PROPERTY_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 const std::vector<std::string>& technologies, 132 const std::vector<std::string>& technologies,
133 const network_handler::ErrorCallback& error_callback); 133 const network_handler::ErrorCallback& error_callback);
134 134
135 // Sets the list of devices on which portal check is enabled. 135 // Sets the list of devices on which portal check is enabled.
136 void SetCheckPortalList(const std::string& check_portal_list); 136 void SetCheckPortalList(const std::string& check_portal_list);
137 137
138 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we 138 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we
139 // only set it. 139 // only set it.
140 void SetWakeOnLanEnabled(bool enabled); 140 void SetWakeOnLanEnabled(bool enabled);
141 141
142 // Calls shill to enable/disable network bandwidth throttling. If |enabled|
143 // is true, |upload_rate_kbits| and |download_rate_kbits| specify the rate
144 // in kbits/s to throttle to. If |enabled| is false, throttling is disabled
145 // and the rates are ignored.
146 void SetNetworkThrottlingStatus(bool enabled,
147 uint32_t upload_rate_kbits,
148 uint32_t download_rate_kbits);
149
142 // Requests an immediate network scan. 150 // Requests an immediate network scan.
143 void RequestScan() const; 151 void RequestScan() const;
144 152
145 // Requests all properties for the service or device (called for new items). 153 // Requests all properties for the service or device (called for new items).
146 void RequestProperties(ManagedState::ManagedType type, 154 void RequestProperties(ManagedState::ManagedType type,
147 const std::string& path); 155 const std::string& path);
148 156
149 // ShillPropertyChangedObserver overrides 157 // ShillPropertyChangedObserver overrides
150 void OnPropertyChanged(const std::string& key, 158 void OnPropertyChanged(const std::string& key,
151 const base::Value& value) override; 159 const base::Value& value) override;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 std::set<std::string> prohibited_technologies_; 260 std::set<std::string> prohibited_technologies_;
253 std::set<std::string> uninitialized_technologies_; 261 std::set<std::string> uninitialized_technologies_;
254 262
255 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler); 263 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler);
256 }; 264 };
257 265
258 } // namespace internal 266 } // namespace internal
259 } // namespace chromeos 267 } // namespace chromeos
260 268
261 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 269 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698