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

Unified Diff: chrome/browser/usb/web_usb_detector.cc

Issue 2295023002: Delay WebUSB initialization until after browser startup. (Closed)
Patch Set: Add UMA for WebUSB detector initialization time. Created 4 years, 4 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
« no previous file with comments | « chrome/browser/usb/web_usb_detector.h ('k') | chrome/browser/usb/web_usb_detector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/usb/web_usb_detector.cc
diff --git a/chrome/browser/usb/web_usb_detector.cc b/chrome/browser/usb/web_usb_detector.cc
index 3687fdb3ab6a16241854811fa1b2ce2c1a477e26..294d27bcef64fcbc2248cc497d681f6e52f26fc8 100644
--- a/chrome/browser/usb/web_usb_detector.cc
+++ b/chrome/browser/usb/web_usb_detector.cc
@@ -113,13 +113,12 @@ class WebUsbNotificationDelegate : public message_center::NotificationDelegate {
} // namespace
-WebUsbDetector::WebUsbDetector() : observer_(this) {
- Initialize();
-}
+WebUsbDetector::WebUsbDetector() : observer_(this) {}
WebUsbDetector::~WebUsbDetector() {}
void WebUsbDetector::Initialize() {
+ SCOPED_UMA_HISTOGRAM_TIMER("WebUsb.DetectorInitialization");
device::UsbService* usb_service =
device::DeviceClient::Get()->GetUsbService();
if (!usb_service)
« no previous file with comments | « chrome/browser/usb/web_usb_detector.h ('k') | chrome/browser/usb/web_usb_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698