Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index fe298463c97f143300c8abd98da235f4be79f648..6b0ed55c91cf4296c0f091bf287505ea04589e1a 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -1279,7 +1279,12 @@ void ChromeBrowserMainParts::PostBrowserStart() { |
#endif // defined(ENABLE_WEBRTC) |
#if !defined(OS_ANDROID) |
- if (base::FeatureList::IsEnabled(features::kWebUsb)) { |
+ // WebUSB is an experimental web API. The sites these notifications will link |
+ // to will only work if the experiment is enabled and WebUSB feature is |
+ // enabled. |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableExperimentalWebPlatformFeatures) && |
+ base::FeatureList::IsEnabled(features::kWebUsb)) { |
webusb_browser_client_.reset(new ChromeWebUsbBrowserClient()); |
webusb_detector_.reset( |
new webusb::WebUsbDetector(webusb_browser_client_.get())); |