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

Unified Diff: device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc

Issue 2861533004: Implement chrome.bluetoothLowEnergy.resetAdvertising(). (Closed)
Patch Set: Implement chrome.bluetoothLowEnergy.resetAllAdvertisements(). Created 3 years, 6 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: device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
diff --git a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
index 3488cc193653bc14ed6e24ba54ed28ed0fcf0d8f..277f81cffa85dfbfcef9c6cfe63922febfd36660 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
@@ -133,6 +133,24 @@ class BluetoothAdvertisementManagerClientImpl
weak_ptr_factory_.GetWeakPtr(), error_callback));
}
+ void ResetAdvertising(const dbus::ObjectPath& manager_object_path,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override {
+ dbus::MethodCall method_call(
+ bluetooth_advertising_manager::kBluetoothAdvertisingManagerInterface,
+ bluetooth_advertising_manager::kResetAdvertising);
+
+ DCHECK(object_manager_);
+ dbus::ObjectProxy* object_proxy =
+ object_manager_->GetObjectProxy(manager_object_path);
+ object_proxy->CallMethodWithErrorCallback(
+ &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::Bind(&BluetoothAdvertisementManagerClientImpl::OnSuccess,
+ weak_ptr_factory_.GetWeakPtr(), callback),
+ base::Bind(&BluetoothAdvertisementManagerClientImpl::OnError,
+ weak_ptr_factory_.GetWeakPtr(), error_callback));
+ }
+
protected:
void Init(dbus::Bus* bus) override {
DCHECK(bus);

Powered by Google App Engine
This is Rietveld 408576698