Commit b15fc11d authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

DevTools: use --custom-devtools-frontend to specify bundle path

When built using debug_devtools=true, allow using --custom-devtools-frontend
command line flag to specify path to DevTools frontend resource files.

Bug: 988990
Change-Id: I90e84ba797397af77477838030961ebd6f2f8cac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1741813Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685538}
parent 01186b68
...@@ -369,7 +369,11 @@ void DevToolsDataSource::StartFileRequestForDebugDevtools( ...@@ -369,7 +369,11 @@ void DevToolsDataSource::StartFileRequestForDebugDevtools(
const std::string& path, const std::string& path,
const GotDataCallback& callback) { const GotDataCallback& callback) {
base::FilePath inspector_debug_dir; base::FilePath inspector_debug_dir;
if (!base::PathService::Get(chrome::DIR_INSPECTOR_DEBUG, base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kCustomDevtoolsFrontend)) {
inspector_debug_dir =
command_line->GetSwitchValuePath(switches::kCustomDevtoolsFrontend);
} else if (!base::PathService::Get(chrome::DIR_INSPECTOR_DEBUG,
&inspector_debug_dir)) { &inspector_debug_dir)) {
callback.Run(CreateNotFoundResponse()); callback.Run(CreateNotFoundResponse());
return; return;
......
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