| Index: chrome/browser/prefs/command_line_pref_store.cc
|
| diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc
|
| index 148616e279d145fc6ff587ee05a6d8963e571be1..18e6ed48f977128810c1f6ad7926072e3f2239b3 100644
|
| --- a/chrome/browser/prefs/command_line_pref_store.cc
|
| +++ b/chrome/browser/prefs/command_line_pref_store.cc
|
| @@ -15,9 +15,6 @@
|
| const CommandLinePrefStore::StringSwitchToPreferenceMapEntry
|
| CommandLinePrefStore::string_switch_map_[] = {
|
| { switches::kLang, prefs::kApplicationLocale },
|
| - { switches::kProxyServer, prefs::kProxyServer },
|
| - { switches::kProxyPacUrl, prefs::kProxyPacUrl },
|
| - { switches::kProxyBypassList, prefs::kProxyBypassList },
|
| { switches::kAuthSchemes, prefs::kAuthSchemes },
|
| { switches::kAuthServerWhitelist, prefs::kAuthServerWhitelist },
|
| { switches::kAuthNegotiateDelegateWhitelist,
|
| @@ -77,16 +74,23 @@ bool CommandLinePrefStore::ValidateProxySwitches() {
|
|
|
| void CommandLinePrefStore::ApplyProxyMode() {
|
| if (command_line_->HasSwitch(switches::kNoProxyServer)) {
|
| - SetValue(prefs::kProxyMode,
|
| - Value::CreateIntegerValue(ProxyPrefs::MODE_DIRECT));
|
| + SetValue(prefs::kProxy,
|
| + ProxyPrefsDictionary::CreateDirect());
|
| } else if (command_line_->HasSwitch(switches::kProxyPacUrl)) {
|
| - SetValue(prefs::kProxyMode,
|
| - Value::CreateIntegerValue(ProxyPrefs::MODE_PAC_SCRIPT));
|
| + std::string pac_script_url =
|
| + command_line_->GetSwitchValueASCII(switches::kProxyPacUrl);
|
| + SetValue(prefs::kProxy,
|
| + ProxyPrefsDictionary::CreatePacScript(pac_script_url));
|
| } else if (command_line_->HasSwitch(switches::kProxyAutoDetect)) {
|
| - SetValue(prefs::kProxyMode,
|
| - Value::CreateIntegerValue(ProxyPrefs::MODE_AUTO_DETECT));
|
| + SetValue(prefs::kProxy,
|
| + ProxyPrefsDictionary::CreateAutoDetect());
|
| } else if (command_line_->HasSwitch(switches::kProxyServer)) {
|
| - SetValue(prefs::kProxyMode,
|
| - Value::CreateIntegerValue(ProxyPrefs::MODE_FIXED_SERVERS));
|
| + std::string proxy_server =
|
| + command_line_->GetSwitchValueASCII(switches::kProxyServer);
|
| + std::string bypass_list =
|
| + command_line_->GetSwitchValueASCII(switches::kProxyBypassList);
|
| + SetValue(prefs::kProxy,
|
| + ProxyPrefsDictionary::CreateFixedServers(proxy_server,
|
| + bypass_list));
|
| }
|
| }
|
|
|