| 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/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 const CommandLinePrefStore::BooleanSwitchToPreferenceMapEntry | 26 const CommandLinePrefStore::BooleanSwitchToPreferenceMapEntry |
| 27 CommandLinePrefStore::boolean_switch_map_[] = { | 27 CommandLinePrefStore::boolean_switch_map_[] = { |
| 28 { switches::kNoProxyServer, prefs::kNoProxyServer, true }, | 28 { switches::kNoProxyServer, prefs::kNoProxyServer, true }, |
| 29 { switches::kProxyAutoDetect, prefs::kProxyAutoDetect, true }, | 29 { switches::kProxyAutoDetect, prefs::kProxyAutoDetect, true }, |
| 30 { switches::kDisableAuthNegotiateCnameLookup, | 30 { switches::kDisableAuthNegotiateCnameLookup, |
| 31 prefs::kDisableAuthNegotiateCnameLookup, true }, | 31 prefs::kDisableAuthNegotiateCnameLookup, true }, |
| 32 { switches::kEnableAuthNegotiatePort, prefs::kEnableAuthNegotiatePort, | 32 { switches::kEnableAuthNegotiatePort, prefs::kEnableAuthNegotiatePort, |
| 33 true }, | 33 true }, |
| 34 { switches::kDisable3DAPIs, prefs::kDisable3DAPIs, true }, |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) | 37 CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) |
| 37 : command_line_(command_line), | 38 : command_line_(command_line), |
| 38 prefs_(new DictionaryValue()) {} | 39 prefs_(new DictionaryValue()) {} |
| 39 | 40 |
| 40 CommandLinePrefStore::~CommandLinePrefStore() {} | 41 CommandLinePrefStore::~CommandLinePrefStore() {} |
| 41 | 42 |
| 42 PrefStore::PrefReadError CommandLinePrefStore::ReadPrefs() { | 43 PrefStore::PrefReadError CommandLinePrefStore::ReadPrefs() { |
| 43 ApplySimpleSwitches(); | 44 ApplySimpleSwitches(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 69 (command_line_->HasSwitch(switches::kProxyAutoDetect) || | 70 (command_line_->HasSwitch(switches::kProxyAutoDetect) || |
| 70 command_line_->HasSwitch(switches::kProxyServer) || | 71 command_line_->HasSwitch(switches::kProxyServer) || |
| 71 command_line_->HasSwitch(switches::kProxyPacUrl) || | 72 command_line_->HasSwitch(switches::kProxyPacUrl) || |
| 72 command_line_->HasSwitch(switches::kProxyBypassList))) { | 73 command_line_->HasSwitch(switches::kProxyBypassList))) { |
| 73 LOG(WARNING) << "Additional command-line proxy switches specified when --" | 74 LOG(WARNING) << "Additional command-line proxy switches specified when --" |
| 74 << switches::kNoProxyServer << " was also specified."; | 75 << switches::kNoProxyServer << " was also specified."; |
| 75 return false; | 76 return false; |
| 76 } | 77 } |
| 77 return true; | 78 return true; |
| 78 } | 79 } |
| OLD | NEW |