Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4245)

Unified Diff: chrome/browser/browser_init.cc

Issue 4309: Adds an --incognito switch that can be used to launch Chrome in Incognito mod... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_init.cc
===================================================================
--- chrome/browser/browser_init.cc (revision 2596)
+++ chrome/browser/browser_init.cc (working copy)
@@ -668,6 +668,10 @@
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()) {
« no previous file with comments | « AUTHORS ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698