summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions/session_restore.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sessions/session_restore.cc')
-rw-r--r--chrome/browser/sessions/session_restore.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 74038ce..e9e0b1d1 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -417,8 +417,13 @@ static void Restore(Profile* profile,
bool always_create_tabbed_browser,
const std::vector<GURL>& urls_to_open) {
DCHECK(profile);
- if (!profile->GetSessionService())
+ // Always restore from the original profile (incognito profiles have no
+ // session service).
+ profile = profile->GetOriginalProfile();
+ if (!profile->GetSessionService()) {
+ NOTREACHED();
return;
+ }
// SessionRestoreImpl takes care of deleting itself when done.
SessionRestoreImpl* restorer =
new SessionRestoreImpl(profile, browser, synchronous,