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 #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 Loading... |
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 |
93 void DisableTechnology(const std::string& type, | 109 void DisableTechnology(const std::string& type, |
94 const base::Closure& callback, | 110 const base::Closure& callback, |
95 const ErrorCallback& error_callback) override { | 111 const ErrorCallback& error_callback) override { |
96 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, | 112 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, |
97 shill::kDisableTechnologyFunction); | 113 shill::kDisableTechnologyFunction); |
98 dbus::MessageWriter writer(&method_call); | 114 dbus::MessageWriter writer(&method_call); |
99 writer.AppendString(type); | 115 writer.AppendString(type); |
100 helper_->CallVoidMethodWithErrorCallback(&method_call, | 116 helper_->CallVoidMethodWithErrorCallback(&method_call, |
101 callback, | 117 callback, |
102 error_callback); | 118 error_callback); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 251 } |
236 | 252 |
237 // ShillManagerClient::VerificationProperties implementation. | 253 // ShillManagerClient::VerificationProperties implementation. |
238 ShillManagerClient::VerificationProperties::VerificationProperties() { | 254 ShillManagerClient::VerificationProperties::VerificationProperties() { |
239 } | 255 } |
240 | 256 |
241 ShillManagerClient::VerificationProperties::~VerificationProperties() { | 257 ShillManagerClient::VerificationProperties::~VerificationProperties() { |
242 } | 258 } |
243 | 259 |
244 } // namespace chromeos | 260 } // namespace chromeos |
OLD | NEW |