Commit 4258ecf0 authored by pfeldman's avatar pfeldman Committed by Commit bot

DevTools: allow passing command line flags into devtools front-end.

BUG=649808

Review-Url: https://codereview.chromium.org/2367003002
Cr-Commit-Position: refs/heads/master@{#420790}
parent f41ca05a
......@@ -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);
}
......
......@@ -153,6 +153,9 @@ const char kDebugEnableFrameToggle[] = "debug-enable-frame-toggle";
// apps.
const char kDebugPackedApps[] = "debug-packed-apps";
// Passes command line parameters to the DevTools front-end.
const char kDevToolsFlags[] = "devtools-flags";
// Triggers a plethora of diagnostic modes.
const char kDiagnostics[] = "diagnostics";
......
......@@ -60,6 +60,7 @@ extern const char kCrashOnHangThreads[];
extern const char kCreateBrowserOnStartupForTests[];
extern const char kDebugEnableFrameToggle[];
extern const char kDebugPackedApps[];
extern const char kDevToolsFlags[];
extern const char kDiagnostics[];
extern const char kDiagnosticsFormat[];
extern const char kDiagnosticsRecovery[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment