diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | chrome/browser/browser_init.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
4 files changed, 9 insertions, 0 deletions
@@ -14,4 +14,5 @@ Matthias Reitinger <reimarvin@gmail.com> Peter Bright <drpizza@quiscalusmexicanus.org> Arthur Lussos <developer0420@gmail.com> Masahiro Yado <yado.masa@gmail.com> +Yarin Kaul <yarin.kaul@gmail.com> Gaetano Mendola <mendola@gmail.com> diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 859b94b..a9e0134 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -668,6 +668,10 @@ bool BrowserInit::LaunchBrowser(const CommandLine& parsed_command_line, bool process_startup, int* return_code) { DCHECK(profile); + // Continue with the off-the-record profile from here on if --incognito + if (parsed_command_line.HasSwitch(switches::kIncognito)) + profile = profile->GetOffTheRecordProfile(); + // Are we starting an application? std::wstring app_url = parsed_command_line.GetSwitchValue(switches::kApp); if (!app_url.empty()) { diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index c8e956a..2224e39 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -330,6 +330,9 @@ const wchar_t kEnableP13n[] = L"enable-p13n"; // SDCH is currently only supported server-side for searches on google.com. const wchar_t kSdchFilter[] = L"enable-sdch"; +// Causes the browser to launch directly in incognito mode. +const wchar_t kIncognito[] = L"incognito"; + // Turn on an experimental implementation of SafeBrowsing which improves // performance during updates by avoiding the enormous IO from SQLite // operations. diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index a3c89e3..79c1d05 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -128,6 +128,7 @@ extern const wchar_t kEnableP13n[]; extern const wchar_t kSdchFilter[]; +extern const wchar_t kIncognito[]; extern const wchar_t kUseNewSafeBrowsing[]; } // namespace switches |