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

Unified Diff: chrome/browser/devtools/devtools_window.cc

Issue 2367003002: DevTools: allow passing command line flags into devtools front-end. (Closed)
Patch Set: same Created 4 years, 3 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 | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_window.cc
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index 60245ddf91bd6ea2cb781bc83edb0d5844ac4ec2..1ded40c204d2bf406edc81a893b7ab8c5fc1d7a0 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -199,12 +199,21 @@ GURL DecorateFrontendURL(const GURL& base_url) {
frontend_url +
((frontend_url.find("?") == std::string::npos) ? "?" : "&") +
"dockSide=undocked"); // TODO(dgozman): remove this support in M38.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableDevToolsExperiments))
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kEnableDevToolsExperiments))
url_string += "&experiments=true";
+
+ if (command_line->HasSwitch(switches::kDevToolsFlags)) {
+ std::string flags = command_line->GetSwitchValueASCII(
+ switches::kDevToolsFlags);
+ flags = net::EscapeQueryParamValue(flags, false);
+ url_string += "&flags=" + flags;
+ }
+
#if defined(DEBUG_DEVTOOLS)
url_string += "&debugFrontend=true";
#endif // defined(DEBUG_DEVTOOLS)
+
return GURL(url_string);
}
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698