OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 9 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 true }, | 32 true }, |
33 { switches::kAllowOutdatedPlugins, prefs::kPluginsAllowOutdated, true }, | 33 { switches::kAllowOutdatedPlugins, prefs::kPluginsAllowOutdated, true }, |
34 { switches::kAlwaysAuthorizePlugins, prefs::kPluginsAlwaysAuthorize, | 34 { switches::kAlwaysAuthorizePlugins, prefs::kPluginsAlwaysAuthorize, |
35 true }, | 35 true }, |
36 { switches::kNoPings, prefs::kEnableHyperlinkAuditing, false }, | 36 { switches::kNoPings, prefs::kEnableHyperlinkAuditing, false }, |
37 { switches::kNoReferrers, prefs::kEnableReferrers, false }, | 37 { switches::kNoReferrers, prefs::kEnableReferrers, false }, |
38 { switches::kAllowRunningInsecureContent, | 38 { switches::kAllowRunningInsecureContent, |
39 prefs::kWebKitAllowRunningInsecureContent, true }, | 39 prefs::kWebKitAllowRunningInsecureContent, true }, |
40 { switches::kNoDisplayingInsecureContent, | 40 { switches::kNoDisplayingInsecureContent, |
41 prefs::kWebKitAllowDisplayingInsecureContent, false }, | 41 prefs::kWebKitAllowDisplayingInsecureContent, false }, |
| 42 { switches::kAllowCrossOriginAuthPrompt, |
| 43 prefs::kAllowCrossOriginAuthPrompt, true }, |
42 }; | 44 }; |
43 | 45 |
44 CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) | 46 CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) |
45 : command_line_(command_line) { | 47 : command_line_(command_line) { |
46 ApplySimpleSwitches(); | 48 ApplySimpleSwitches(); |
47 ApplyProxyMode(); | 49 ApplyProxyMode(); |
48 ValidateProxySwitches(); | 50 ValidateProxySwitches(); |
49 } | 51 } |
50 | 52 |
51 CommandLinePrefStore::~CommandLinePrefStore() {} | 53 CommandLinePrefStore::~CommandLinePrefStore() {} |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } else if (command_line_->HasSwitch(switches::kProxyServer)) { | 99 } else if (command_line_->HasSwitch(switches::kProxyServer)) { |
98 std::string proxy_server = | 100 std::string proxy_server = |
99 command_line_->GetSwitchValueASCII(switches::kProxyServer); | 101 command_line_->GetSwitchValueASCII(switches::kProxyServer); |
100 std::string bypass_list = | 102 std::string bypass_list = |
101 command_line_->GetSwitchValueASCII(switches::kProxyBypassList); | 103 command_line_->GetSwitchValueASCII(switches::kProxyBypassList); |
102 SetValue(prefs::kProxy, | 104 SetValue(prefs::kProxy, |
103 ProxyConfigDictionary::CreateFixedServers(proxy_server, | 105 ProxyConfigDictionary::CreateFixedServers(proxy_server, |
104 bypass_list)); | 106 bypass_list)); |
105 } | 107 } |
106 } | 108 } |
OLD | NEW |