diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index ef9fc4df0b8c..a32e23de68f5 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -150,6 +150,16 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches( command_line->AppendSwitch(switches::kScrollBounce); #endif + // Custom command line switches. + const base::ListValue* args; + if (web_preferences.GetList("commandLineSwitches", &args)) { + for (size_t i = 0; i < args->GetSize(); ++i) { + std::string arg; + if (args->GetString(i, &arg) && !arg.empty()) + command_line->AppendSwitch(arg); + } + } + // Enable blink features. std::string blink_features; if (web_preferences.GetString(options::kBlinkFeatures, &blink_features))