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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1917103004: Move WebUSB from OriginTrialEnabled to RuntimeEnabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correct content/public/common/content_features.h 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_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 9bd60b90ca886b87469ed21dcf24a24ace4a3586..1246431278cd7ced8fa2359f071f3d87c374a4eb 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2773,7 +2773,11 @@ void ChromeContentBrowserClient::RegisterFrameMojoShellServices(
void ChromeContentBrowserClient::RegisterRenderFrameMojoServices(
content::ServiceRegistry* registry,
content::RenderFrameHost* render_frame_host) {
- if (base::FeatureList::IsEnabled(features::kWebUsb)) {
+ // WebUSB is an experimental web API. It 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)) {
registry->AddService(
base::Bind(&CreateUsbDeviceManager, render_frame_host));
registry->AddService(

Powered by Google App Engine
This is Rietveld 408576698