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

Unified Diff: chromeos/network/shill_property_handler.cc

Issue 2364703002: Add network throttling as an enterprise policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add network bandwidth throttling as an enterprise policy Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/shill_property_handler.cc
diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc
index a521385e6a47b15f0a12007c2ffcd39987192203..11ec7d08355ea4006cc54f3813072c724ea4b1a4 100644
--- a/chromeos/network/shill_property_handler.cc
+++ b/chromeos/network/shill_property_handler.cc
@@ -6,7 +6,9 @@
#include <stddef.h>
+#include <memory>
Andrew T Wilson (Slow) 2016/10/21 13:27:31 You don't seem to have added any code that require
stevenjb 2016/10/21 19:41:21 <memory> is in the header so we don't need to repe
kirtika1 2016/10/23 00:04:49 Done.
#include <sstream>
+#include <utility>
#include "base/bind.h"
#include "base/format_macros.h"
@@ -229,6 +231,18 @@ void ShillPropertyHandler::SetWakeOnLanEnabled(bool enabled) {
network_handler::ErrorCallback()));
}
+void ShillPropertyHandler::SetNetworkThrottlingStatus(
+ bool throttling_enabled,
+ uint32_t upload_rate_kbits,
+ uint32_t download_rate_kbits) {
+ shill_manager_->SetNetworkThrottlingStatus(
+ throttling_enabled, upload_rate_kbits, download_rate_kbits,
+ base::Bind(&base::DoNothing),
+ base::Bind(&network_handler::ShillErrorCallbackFunction,
+ "SetNetworkThrottlingStatus failed", "Manager",
+ network_handler::ErrorCallback()));
+}
+
void ShillPropertyHandler::RequestScan() const {
shill_manager_->RequestScan(
"", base::Bind(&base::DoNothing),

Powered by Google App Engine
This is Rietveld 408576698