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

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

Issue 741883002: Do not use the 'original' profile for guest sessions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/settings_window_manager.cc
diff --git a/chrome/browser/ui/settings_window_manager.cc b/chrome/browser/ui/settings_window_manager.cc
index dbe176a49198a66473de282510a3728e48c67ef4..5e4954b8cae94a56c555b510fad6ebe02f7ebb48 100644
--- a/chrome/browser/ui/settings_window_manager.cc
+++ b/chrome/browser/ui/settings_window_manager.cc
@@ -35,8 +35,11 @@ void SettingsWindowManager::RemoveObserver(
void SettingsWindowManager::ShowChromePageForProfile(Profile* profile,
const GURL& gurl) {
- // Use the original (non off-the-record) profile for settings.
- profile = profile->GetOriginalProfile();
+ // Use the original (non off-the-record) profile for settings unless
+ // this is a guest session.
+ if (!profile->IsGuestSession() && profile->IsOffTheRecord())
+ profile = profile->GetOriginalProfile();
+
// Look for an existing browser window.
Browser* browser = FindBrowserForProfile(profile);
if (browser) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698