From: Cheng Zhao Date: Fri, 19 Jun 2015 13:53:29 +0000 (+0800) Subject: Only append --register-standard-schemes when needed X-Git-Tag: v0.28.3~9 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a1cbd11b5b60eddfbab2709c21fa95daaefb675f;p=electron.git Only append --register-standard-schemes when needed --- diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index c62bc643..a4e2734a 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -183,12 +183,12 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches( base::CommandLine* command_line, int process_id) { std::string process_type = command_line->GetSwitchValueASCII("type"); - if (process_type != "renderer") return; - command_line->AppendSwitchASCII(switches::kRegisterStandardSchemes, - g_custom_schemes); + if (!g_custom_schemes.empty()) + command_line->AppendSwitchASCII(switches::kRegisterStandardSchemes, + g_custom_schemes); NativeWindow* window; WebViewManager::WebViewInfo info;