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

Unified Diff: device/bluetooth/bluetooth_device_experimental_chromeos.h

Issue 13872017: Bluetooth: gather usage metrics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase since Cellular.* appeared under us Created 7 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: device/bluetooth/bluetooth_device_experimental_chromeos.h
diff --git a/device/bluetooth/bluetooth_device_experimental_chromeos.h b/device/bluetooth/bluetooth_device_experimental_chromeos.h
index a260bec84a62a7c568552e6811ed8e5e082f7475..0a19d26c48c25795f5f8b35d7a79a8c350712f28 100644
--- a/device/bluetooth/bluetooth_device_experimental_chromeos.h
+++ b/device/bluetooth/bluetooth_device_experimental_chromeos.h
@@ -27,7 +27,11 @@ class BluetoothDeviceExperimentalChromeOS
private chromeos::ExperimentalBluetoothAgentServiceProvider::Delegate {
public:
// BluetoothDevice override
+ virtual uint32 GetBluetoothClass() const OVERRIDE;
virtual std::string GetAddress() const OVERRIDE;
+ virtual uint16 GetVendorID() const OVERRIDE;
+ virtual uint16 GetProductID() const OVERRIDE;
+ virtual uint16 GetDeviceID() const OVERRIDE;
virtual bool IsPaired() const OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectable() const OVERRIDE;
@@ -72,7 +76,6 @@ class BluetoothDeviceExperimentalChromeOS
protected:
// BluetoothDevice override
- virtual uint32 GetBluetoothClass() const OVERRIDE;
virtual std::string GetDeviceName() const OVERRIDE;
private:
@@ -167,6 +170,11 @@ class BluetoothDeviceExperimentalChromeOS
// pairing. Returns true if any callbacks were run, false if not.
bool RunPairingCallbacks(Status status);
+ // Record the result of pairing as a UMA histogram metric; |success| should
+ // be true if pairing succeeded, and |false| if not - in which case
+ // |error_code| specifies the reason for failure.
+ void RecordPairingResult(bool success, ConnectErrorCode error_code);
+
// Return the object path of the device; used by
// BluetoothAdapterExperimentalChromeOS
const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -185,6 +193,10 @@ class BluetoothDeviceExperimentalChromeOS
// Passkeys. Generally it is the object that owns this one.
PairingDelegate* pairing_delegate_;
+ // Flag to indicate whether a pairing delegate method has been called during
+ // pairing.
+ bool pairing_delegate_used_;
+
// During pairing this is set to an instance of a D-Bus agent object
// intialized with our own class as its delegate.
scoped_ptr<ExperimentalBluetoothAgentServiceProvider> agent_;
« no previous file with comments | « device/bluetooth/bluetooth_device_chromeos.cc ('k') | device/bluetooth/bluetooth_device_experimental_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698