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

Unified Diff: chromeos/dbus/bluetooth_le_advertisement_service_provider.h

Issue 1054743003: Add CPP API for BLE advertisments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tentative win fix Created 5 years, 8 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: chromeos/dbus/bluetooth_le_advertisement_service_provider.h
diff --git a/chromeos/dbus/bluetooth_le_advertisement_service_provider.h b/chromeos/dbus/bluetooth_le_advertisement_service_provider.h
index 4cea5d81133d5fe04cd6a69a166bc1fae72eaed3..98622a2a1d658c23d18490c88a39046fe8d52cb3 100644
--- a/chromeos/dbus/bluetooth_le_advertisement_service_provider.h
+++ b/chromeos/dbus/bluetooth_le_advertisement_service_provider.h
@@ -50,11 +50,13 @@ class CHROMEOS_EXPORT BluetoothLEAdvertisementServiceProvider {
virtual ~BluetoothLEAdvertisementServiceProvider();
+ const dbus::ObjectPath& object_path() { return object_path_; }
+
// Creates the instance where |bus| is the D-Bus bus connection to export
// the object onto, |object_path| is the object path that it should have
// and |delegate| is the object to which all method calls will be passed
// and responses generated from.
- static BluetoothLEAdvertisementServiceProvider* Create(
+ static scoped_ptr<BluetoothLEAdvertisementServiceProvider> Create(
dbus::Bus* bus,
const dbus::ObjectPath& object_path,
Delegate* delegate,
@@ -67,6 +69,10 @@ class CHROMEOS_EXPORT BluetoothLEAdvertisementServiceProvider {
protected:
BluetoothLEAdvertisementServiceProvider();
+ // D-Bus object path of object we are exporting, kept so we can unregister
+ // again in our destructor.
+ dbus::ObjectPath object_path_;
+
private:
DISALLOW_COPY_AND_ASSIGN(BluetoothLEAdvertisementServiceProvider);
};

Powered by Google App Engine
This is Rietveld 408576698