]> khamidou — GitHub mirrors - electron.git/commitdiff
Only append --register-standard-schemes when needed
authorCheng Zhao <zcbenz@gmail.com>
Fri, 19 Jun 2015 13:53:29 +0000 (21:53 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 19 Jun 2015 13:53:29 +0000 (21:53 +0800)
atom/browser/atom_browser_client.cc

index c62bc6436ddd6f3692e2d6cb891acf9cd91e63a3..a4e2734a6886e401c3ae275581ed832582005ddb 100644 (file)
@@ -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;