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

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: Only include ChromeOS specific header on ChromeOS 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..68b25bd45db4f13f3d8c691b573273216cc226c6 100644
--- a/device/bluetooth/bluetooth_device_experimental_chromeos.h
+++ b/device/bluetooth/bluetooth_device_experimental_chromeos.h
@@ -76,6 +76,7 @@ class BluetoothDeviceExperimentalChromeOS
private:
friend class BluetoothAdapterExperimentalChromeOS;
+ friend class MetricsLog;
BluetoothDeviceExperimentalChromeOS(
BluetoothAdapterExperimentalChromeOS* adapter,
@@ -104,6 +105,9 @@ class BluetoothDeviceExperimentalChromeOS
const ConfirmationCallback& callback) OVERRIDE;
virtual void Cancel() OVERRIDE;
+ // Used by MetricsLog to obtain the device information.
+ std::string GetModalias() const;
+
// Internal method to initiate a connection to this device, and methods called
// by dbus:: on completion of the D-Bus method call.
void ConnectInternal(const base::Closure& callback,
@@ -166,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_; }
@@ -184,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_;

Powered by Google App Engine
This is Rietveld 408576698