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

Unified Diff: content/browser/bluetooth/bluetooth_metrics.h

Issue 1397983004: bluetooth: Refactor repeated code used to find a Bluetooth object from its ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-characteristic-changed-1
Patch Set: Clean up Created 5 years, 2 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: content/browser/bluetooth/bluetooth_metrics.h
diff --git a/content/browser/bluetooth/bluetooth_metrics.h b/content/browser/bluetooth/bluetooth_metrics.h
index bceb1772a8bd1370089b8a0f1b25b17259ad0ff8..e2faec586300f0fa61089c7089b8620c77bc6659 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -40,6 +40,18 @@ enum class UMAWebBluetoothFunction {
// API.
void RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction function);
+// Enumation for outcomes of querying the bluetooth cache.
+enum class CacheQueryOutcome {
+ SUCCESS = 0,
+ NO_DEVICE = 1,
+ NO_SERVICE = 2,
+ NO_CHARACTERISTIC = 3,
+};
+
+// Record outcome for the function based on the cache query error.
+void RecordOutcomeWithCacheQueryResult(UMAWebBluetoothFunction function,
+ CacheQueryOutcome outcome);
+
// requestDevice() Metrics
enum class UMARequestDeviceOutcome {
SUCCESS = 0,

Powered by Google App Engine
This is Rietveld 408576698