| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/prefs/command_line_pref_store.h" | 5 #include "chrome/browser/prefs/command_line_pref_store.h" |
| 6 | 6 |
| 7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/prefs/proxy_prefs.h" | 10 #include "chrome/browser/prefs/proxy_prefs.h" |
| 11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
| 12 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 13 #include "ui/base/ui_base_switches.h" |
| 13 | 14 |
| 14 const CommandLinePrefStore::StringSwitchToPreferenceMapEntry | 15 const CommandLinePrefStore::StringSwitchToPreferenceMapEntry |
| 15 CommandLinePrefStore::string_switch_map_[] = { | 16 CommandLinePrefStore::string_switch_map_[] = { |
| 16 { switches::kLang, prefs::kApplicationLocale }, | 17 { switches::kLang, prefs::kApplicationLocale }, |
| 17 { switches::kProxyServer, prefs::kProxyServer }, | 18 { switches::kProxyServer, prefs::kProxyServer }, |
| 18 { switches::kProxyPacUrl, prefs::kProxyPacUrl }, | 19 { switches::kProxyPacUrl, prefs::kProxyPacUrl }, |
| 19 { switches::kProxyBypassList, prefs::kProxyBypassList }, | 20 { switches::kProxyBypassList, prefs::kProxyBypassList }, |
| 20 { switches::kAuthSchemes, prefs::kAuthSchemes }, | 21 { switches::kAuthSchemes, prefs::kAuthSchemes }, |
| 21 { switches::kAuthServerWhitelist, prefs::kAuthServerWhitelist }, | 22 { switches::kAuthServerWhitelist, prefs::kAuthServerWhitelist }, |
| 22 { switches::kAuthNegotiateDelegateWhitelist, | 23 { switches::kAuthNegotiateDelegateWhitelist, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 SetValue(prefs::kProxyMode, | 83 SetValue(prefs::kProxyMode, |
| 83 Value::CreateIntegerValue(ProxyPrefs::MODE_PAC_SCRIPT)); | 84 Value::CreateIntegerValue(ProxyPrefs::MODE_PAC_SCRIPT)); |
| 84 } else if (command_line_->HasSwitch(switches::kProxyAutoDetect)) { | 85 } else if (command_line_->HasSwitch(switches::kProxyAutoDetect)) { |
| 85 SetValue(prefs::kProxyMode, | 86 SetValue(prefs::kProxyMode, |
| 86 Value::CreateIntegerValue(ProxyPrefs::MODE_AUTO_DETECT)); | 87 Value::CreateIntegerValue(ProxyPrefs::MODE_AUTO_DETECT)); |
| 87 } else if (command_line_->HasSwitch(switches::kProxyServer)) { | 88 } else if (command_line_->HasSwitch(switches::kProxyServer)) { |
| 88 SetValue(prefs::kProxyMode, | 89 SetValue(prefs::kProxyMode, |
| 89 Value::CreateIntegerValue(ProxyPrefs::MODE_FIXED_SERVERS)); | 90 Value::CreateIntegerValue(ProxyPrefs::MODE_FIXED_SERVERS)); |
| 90 } | 91 } |
| 91 } | 92 } |
| OLD | NEW |