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

Side by Side Diff: content/browser/bluetooth/bluetooth_metrics.cc

Issue 2654403002: Implement WebBluetooth descriptor.writeValue() (Closed)
Patch Set: #4 Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/bluetooth/bluetooth_metrics.h" 5 #include "content/browser/bluetooth/bluetooth_metrics.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 return; 276 return;
277 case UMAGATTOperation::CHARACTERISTIC_WRITE: 277 case UMAGATTOperation::CHARACTERISTIC_WRITE:
278 RecordCharacteristicWriteValueOutcome(outcome); 278 RecordCharacteristicWriteValueOutcome(outcome);
279 return; 279 return;
280 case UMAGATTOperation::START_NOTIFICATIONS: 280 case UMAGATTOperation::START_NOTIFICATIONS:
281 RecordStartNotificationsOutcome(outcome); 281 RecordStartNotificationsOutcome(outcome);
282 return; 282 return;
283 case UMAGATTOperation::DESCRIPTOR_READ: 283 case UMAGATTOperation::DESCRIPTOR_READ:
284 RecordDescriptorReadValueOutcome(outcome); 284 RecordDescriptorReadValueOutcome(outcome);
285 return; 285 return;
286 case UMAGATTOperation::DESCRIPTOR_WRITE:
287 // TODO(683477) reporting for .writeValue()
288 return;
286 case UMAGATTOperation::COUNT: 289 case UMAGATTOperation::COUNT:
287 NOTREACHED(); 290 NOTREACHED();
288 return; 291 return;
289 } 292 }
290 NOTREACHED(); 293 NOTREACHED();
291 } 294 }
292 295
293 static UMAGATTOperationOutcome TranslateCacheQueryOutcomeToGATTOperationOutcome( 296 static UMAGATTOperationOutcome TranslateCacheQueryOutcomeToGATTOperationOutcome(
294 CacheQueryOutcome outcome) { 297 CacheQueryOutcome outcome) {
295 switch (outcome) { 298 switch (outcome) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices) { 381 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices) {
379 if (!accept_all_devices) { 382 if (!accept_all_devices) {
380 UMA_HISTOGRAM_SPARSE_SLOWLY( 383 UMA_HISTOGRAM_SPARSE_SLOWLY(
381 "Bluetooth.Web.RequestDevice." 384 "Bluetooth.Web.RequestDevice."
382 "NumOfDevicesInChooserWhenNotAcceptingAllDevices", 385 "NumOfDevicesInChooserWhenNotAcceptingAllDevices",
383 std::min(num_of_devices, kMaxNumOfDevices)); 386 std::min(num_of_devices, kMaxNumOfDevices));
384 } 387 }
385 } 388 }
386 389
387 } // namespace content 390 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bluetooth/bluetooth_metrics.h ('k') | content/browser/bluetooth/web_bluetooth_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698