OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/chromeos/extensions/networking_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/networking_private_api.h" |
6 | 6 |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "chrome/browser/extensions/extension_function_registry.h" | 8 #include "chrome/browser/extensions/extension_function_registry.h" |
9 #include "chrome/common/extensions/api/networking_private.h" | 9 #include "chrome/common/extensions/api/networking_private.h" |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 284 } |
285 | 285 |
286 bool NetworkingPrivateStartDisconnectFunction::RunImpl() { | 286 bool NetworkingPrivateStartDisconnectFunction::RunImpl() { |
287 scoped_ptr<api::StartDisconnect::Params> params = | 287 scoped_ptr<api::StartDisconnect::Params> params = |
288 api::StartDisconnect::Params::Create(*args_); | 288 api::StartDisconnect::Params::Create(*args_); |
289 EXTENSION_FUNCTION_VALIDATE(params); | 289 EXTENSION_FUNCTION_VALIDATE(params); |
290 | 290 |
291 // TODO(gspencer): Currently the |network_guid| parameter is storing the | 291 // TODO(gspencer): Currently the |network_guid| parameter is storing the |
292 // service path. Convert to using the actual GUID when we start using | 292 // service path. Convert to using the actual GUID when we start using |
293 // the NetworkStateHandler. | 293 // the NetworkStateHandler. |
294 DBusThreadManager::Get()->GetShillServiceClient()->Connect( | 294 DBusThreadManager::Get()->GetShillServiceClient()->Disconnect( |
295 dbus::ObjectPath(params->network_guid), | 295 dbus::ObjectPath(params->network_guid), |
296 base::Bind( | 296 base::Bind( |
297 &NetworkingPrivateStartDisconnectFunction::DisconnectionStartSuccess, | 297 &NetworkingPrivateStartDisconnectFunction::DisconnectionStartSuccess, |
298 this), | 298 this), |
299 base::Bind( | 299 base::Bind( |
300 &NetworkingPrivateStartDisconnectFunction::DisconnectionStartFailed, | 300 &NetworkingPrivateStartDisconnectFunction::DisconnectionStartFailed, |
301 this)); | 301 this)); |
302 return true; | 302 return true; |
303 } | 303 } |
OLD | NEW |