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

Unified Diff: chrome/browser/ui/browser_navigator.cc

Issue 6272016: Prevent non-Incognito windows in the Guest session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser
Patch Set: fixed win warning + indent Created 9 years, 10 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 | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/ui/browser_navigator_browsertest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index f9dca07f548dc0ff869fc0007310c8409e06d338..bcd40cf505c3ece2701b3780f4700163af16d227 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -105,7 +105,8 @@ int GetIndexOfSingletonTab(browser::NavigateParams* params) {
// Change some of the navigation parameters based on the particular URL.
// Currently this applies to chrome://settings and the bookmark manager,
-// which we always want to open in a normal (not incognito) window.
+// which we always want to open in a normal (not incognito) window. Guest
+// session is an exception.
void AdjustNavigateParamsForURL(browser::NavigateParams* params) {
if (!params->target_contents &&
params->url.scheme() == chrome::kChromeUIScheme &&
@@ -114,7 +115,7 @@ void AdjustNavigateParamsForURL(browser::NavigateParams* params) {
Profile* profile =
params->browser ? params->browser->profile() : params->profile;
- if (profile->IsOffTheRecord()) {
+ if (profile->IsOffTheRecord() && !Profile::IsGuestSession()) {
profile = profile->GetOriginalProfile();
params->disposition = SINGLETON_TAB;
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/ui/browser_navigator_browsertest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698