Chromium Code Reviews| 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 a0e94dc94baa411d525df3319bace557d013930b..23014726dc62543c878d5a6a09a2195d52d4fbca 100644 |
| --- a/chrome/browser/prefs/command_line_pref_store.cc |
| +++ b/chrome/browser/prefs/command_line_pref_store.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/logging.h" |
| #include "base/string_split.h" |
| #include "base/values.h" |
| +#include "chrome/browser/prefs/incognito_mode_availability_prefs.h" |
| #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/pref_names.h" |
| @@ -42,7 +43,6 @@ const CommandLinePrefStore::BooleanSwitchToPreferenceMapEntry |
| prefs::kWebKitAllowDisplayingInsecureContent, false }, |
| { switches::kAllowCrossOriginAuthPrompt, |
| prefs::kAllowCrossOriginAuthPrompt, true }, |
| - { switches::kIncognito, prefs::kIncognitoForced, true }, |
| }; |
| CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) |
| @@ -51,6 +51,7 @@ CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) |
| ApplyProxyMode(); |
| ValidateProxySwitches(); |
| ApplySSLSwitches(); |
| + ApplyIncognitoSwitches(); |
| } |
| CommandLinePrefStore::~CommandLinePrefStore() {} |
| @@ -124,3 +125,10 @@ void CommandLinePrefStore::ApplySSLSwitches() { |
| SetValue(prefs::kCipherSuiteBlacklist, list_value); |
| } |
| } |
| + |
| +void CommandLinePrefStore::ApplyIncognitoSwitches() { |
| + if (command_line_->HasSwitch(switches::kIncognito)) { |
| + SetValue(prefs::kIncognitoModeAvailability, |
| + Value::CreateIntegerValue(IncognitoModeAvailabilityPrefs::FORCED)); |
|
Bernhard Bauer
2011/07/28 11:34:03
The --incognito flag opens the first window in inc
rustema
2011/07/29 06:49:23
This is now gone.
|
| + } |
| +} |