Commit 547026d2 authored by stevenjb's avatar stevenjb Committed by Commit bot

Do not use the 'original' profile for guest sessions

For guest sessions (profile->IsGuestSession), we do not use
profile->GetOriginalProfile() for browser windows, we use the off the
record profile instead.

This was triggering an assert at the top of Browser::Browser().

BUG=434491

Review URL: https://codereview.chromium.org/741883002

Cr-Commit-Position: refs/heads/master@{#305053}
parent bfa797e0
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment