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

Side by Side Diff: chromeos/dbus/shill_manager_client.cc

Issue 2463023002: Revert of Add network throttling as an enterprise policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted by hand 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
« no previous file with comments | « chromeos/dbus/shill_manager_client.h ('k') | chromeos/dbus/shill_manager_client_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chromeos/dbus/shill_manager_client.h" 5 #include "chromeos/dbus/shill_manager_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 const ErrorCallback& error_callback) override { 83 const ErrorCallback& error_callback) override {
84 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, 84 dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
85 shill::kEnableTechnologyFunction); 85 shill::kEnableTechnologyFunction);
86 dbus::MessageWriter writer(&method_call); 86 dbus::MessageWriter writer(&method_call);
87 writer.AppendString(type); 87 writer.AppendString(type);
88 helper_->CallVoidMethodWithErrorCallback(&method_call, 88 helper_->CallVoidMethodWithErrorCallback(&method_call,
89 callback, 89 callback,
90 error_callback); 90 error_callback);
91 } 91 }
92 92
93 void SetNetworkThrottlingStatus(
94 const bool enabled,
95 const uint32_t upload_rate_kbits,
96 const uint32_t download_rate_kbits,
97 const base::Closure& callback,
98 const ErrorCallback& error_callback) override {
99 dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
100 shill::kSetNetworkThrottlingFunction);
101 dbus::MessageWriter writer(&method_call);
102 writer.AppendBool(enabled);
103 writer.AppendUint32(upload_rate_kbits);
104 writer.AppendUint32(download_rate_kbits);
105 helper_->CallVoidMethodWithErrorCallback(&method_call, callback,
106 error_callback);
107 }
108
109 void DisableTechnology(const std::string& type, 93 void DisableTechnology(const std::string& type,
110 const base::Closure& callback, 94 const base::Closure& callback,
111 const ErrorCallback& error_callback) override { 95 const ErrorCallback& error_callback) override {
112 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, 96 dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
113 shill::kDisableTechnologyFunction); 97 shill::kDisableTechnologyFunction);
114 dbus::MessageWriter writer(&method_call); 98 dbus::MessageWriter writer(&method_call);
115 writer.AppendString(type); 99 writer.AppendString(type);
116 helper_->CallVoidMethodWithErrorCallback(&method_call, 100 helper_->CallVoidMethodWithErrorCallback(&method_call,
117 callback, 101 callback,
118 error_callback); 102 error_callback);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 235 }
252 236
253 // ShillManagerClient::VerificationProperties implementation. 237 // ShillManagerClient::VerificationProperties implementation.
254 ShillManagerClient::VerificationProperties::VerificationProperties() { 238 ShillManagerClient::VerificationProperties::VerificationProperties() {
255 } 239 }
256 240
257 ShillManagerClient::VerificationProperties::~VerificationProperties() { 241 ShillManagerClient::VerificationProperties::~VerificationProperties() {
258 } 242 }
259 243
260 } // namespace chromeos 244 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_manager_client.h ('k') | chromeos/dbus/shill_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698