OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fake_shill_manager_client.h" | 5 #include "chromeos/dbus/fake_shill_manager_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 base::Bind(error_callback, "StubError", "Property not found")); | 224 base::Bind(error_callback, "StubError", "Property not found")); |
225 return; | 225 return; |
226 } | 226 } |
227 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 227 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
228 FROM_HERE, | 228 FROM_HERE, |
229 base::Bind(&FakeShillManagerClient::SetTechnologyEnabled, | 229 base::Bind(&FakeShillManagerClient::SetTechnologyEnabled, |
230 weak_ptr_factory_.GetWeakPtr(), type, callback, true), | 230 weak_ptr_factory_.GetWeakPtr(), type, callback, true), |
231 base::TimeDelta::FromSeconds(interactive_delay_)); | 231 base::TimeDelta::FromSeconds(interactive_delay_)); |
232 } | 232 } |
233 | 233 |
| 234 void FakeShillManagerClient::SetNetworkThrottlingStatus( |
| 235 bool enabled, |
| 236 uint32_t upload_rate_kbits, |
| 237 uint32_t download_rate_kbits, |
| 238 const base::Closure& callback, |
| 239 const ErrorCallback& error_callback) { |
| 240 // TODO(kirtika): Add stubs |
| 241 return; |
| 242 } |
| 243 |
234 void FakeShillManagerClient::DisableTechnology( | 244 void FakeShillManagerClient::DisableTechnology( |
235 const std::string& type, | 245 const std::string& type, |
236 const base::Closure& callback, | 246 const base::Closure& callback, |
237 const ErrorCallback& error_callback) { | 247 const ErrorCallback& error_callback) { |
238 base::ListValue* enabled_list = NULL; | 248 base::ListValue* enabled_list = NULL; |
239 if (!stub_properties_.GetListWithoutPathExpansion( | 249 if (!stub_properties_.GetListWithoutPathExpansion( |
240 shill::kAvailableTechnologiesProperty, &enabled_list)) { | 250 shill::kAvailableTechnologiesProperty, &enabled_list)) { |
241 base::ThreadTaskRunnerHandle::Get()->PostTask( | 251 base::ThreadTaskRunnerHandle::Get()->PostTask( |
242 FROM_HERE, | 252 FROM_HERE, |
243 base::Bind(error_callback, "StubError", "Property not found")); | 253 base::Bind(error_callback, "StubError", "Property not found")); |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 LOG(WARNING) << "Invalid state: " << state << " for " << type; | 1238 LOG(WARNING) << "Invalid state: " << state << " for " << type; |
1229 result = shill::kStateIdle; | 1239 result = shill::kStateIdle; |
1230 } | 1240 } |
1231 } | 1241 } |
1232 VLOG(1) << "Initial state for: " << type << " = " << result | 1242 VLOG(1) << "Initial state for: " << type << " = " << result |
1233 << " Enabled: " << *enabled; | 1243 << " Enabled: " << *enabled; |
1234 return result; | 1244 return result; |
1235 } | 1245 } |
1236 | 1246 |
1237 } // namespace chromeos | 1247 } // namespace chromeos |
OLD | NEW |