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/string_split.h" | 8 #include "base/string_split.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 10 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 { switches::kAlwaysAuthorizePlugins, prefs::kPluginsAlwaysAuthorize, | 35 { switches::kAlwaysAuthorizePlugins, prefs::kPluginsAlwaysAuthorize, |
36 true }, | 36 true }, |
37 { switches::kNoPings, prefs::kEnableHyperlinkAuditing, false }, | 37 { switches::kNoPings, prefs::kEnableHyperlinkAuditing, false }, |
38 { switches::kNoReferrers, prefs::kEnableReferrers, false }, | 38 { switches::kNoReferrers, prefs::kEnableReferrers, false }, |
39 { switches::kAllowRunningInsecureContent, | 39 { switches::kAllowRunningInsecureContent, |
40 prefs::kWebKitAllowRunningInsecureContent, true }, | 40 prefs::kWebKitAllowRunningInsecureContent, true }, |
41 { switches::kNoDisplayingInsecureContent, | 41 { switches::kNoDisplayingInsecureContent, |
42 prefs::kWebKitAllowDisplayingInsecureContent, false }, | 42 prefs::kWebKitAllowDisplayingInsecureContent, false }, |
43 { switches::kAllowCrossOriginAuthPrompt, | 43 { switches::kAllowCrossOriginAuthPrompt, |
44 prefs::kAllowCrossOriginAuthPrompt, true }, | 44 prefs::kAllowCrossOriginAuthPrompt, true }, |
45 { switches::kIncognito, prefs::kIncognitoForced, true }, | |
46 }; | 45 }; |
47 | 46 |
48 CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) | 47 CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) |
49 : command_line_(command_line) { | 48 : command_line_(command_line) { |
50 ApplySimpleSwitches(); | 49 ApplySimpleSwitches(); |
51 ApplyProxyMode(); | 50 ApplyProxyMode(); |
52 ValidateProxySwitches(); | 51 ValidateProxySwitches(); |
53 ApplySSLSwitches(); | 52 ApplySSLSwitches(); |
54 } | 53 } |
55 | 54 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 std::vector<std::string> cipher_strings; | 116 std::vector<std::string> cipher_strings; |
118 base::SplitString(cipher_suites, ',', &cipher_strings); | 117 base::SplitString(cipher_suites, ',', &cipher_strings); |
119 base::ListValue* list_value = new base::ListValue(); | 118 base::ListValue* list_value = new base::ListValue(); |
120 for (std::vector<std::string>::const_iterator it = cipher_strings.begin(); | 119 for (std::vector<std::string>::const_iterator it = cipher_strings.begin(); |
121 it != cipher_strings.end(); ++it) { | 120 it != cipher_strings.end(); ++it) { |
122 list_value->Append(base::Value::CreateStringValue(*it)); | 121 list_value->Append(base::Value::CreateStringValue(*it)); |
123 } | 122 } |
124 SetValue(prefs::kCipherSuiteBlacklist, list_value); | 123 SetValue(prefs::kCipherSuiteBlacklist, list_value); |
125 } | 124 } |
126 } | 125 } |
OLD | NEW |