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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 1917103004: Move WebUSB from OriginTrialEnabled to RuntimeEnabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge TOT Created 4 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: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 1c084e80d56b35e0acf08c730fb8331331c05ca9..bb88829d9b5602d1f19f0eb9221e440bbd8cffa8 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1277,7 +1277,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()));
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698