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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 13368: Fixes two session restore bugs:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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/browser_init.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
===================================================================
--- chrome/browser/sessions/session_restore.cc (revision 6760)
+++ chrome/browser/sessions/session_restore.cc (working copy)
@@ -417,8 +417,13 @@
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,
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698