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

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: Missing SetBluetoothAdapter method; remove weakptr; add DCHECKs 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 ff31ddb68f7eec2d9fde9fe3a72eb01ad6980366..8520089aa3f08233c5ef9720fc277202b5a1ad09 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;
@@ -71,7 +75,6 @@ class BluetoothDeviceExperimentalChromeOS
protected:
// BluetoothDevice override
- virtual uint32 GetBluetoothClass() const OVERRIDE;
virtual std::string GetDeviceName() const OVERRIDE;
private:
@@ -166,6 +169,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_; }
@@ -184,6 +192,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_;

Powered by Google App Engine
This is Rietveld 408576698