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

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

Issue 1131373003: [Session restore] Add MRU logic to loading of background pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary change in tab_restore_service.h Created 5 years, 7 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
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index c6692162035c06fdb0cb02d7c1b7714f178e2d53..ac0960388c86d7f672765c30ccacad163a04ad7d 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -591,6 +591,12 @@ class SessionRestoreImpl : public content::NotificationObserver {
// focused tab will be loaded by Browser, and TabLoader will load the rest.
DCHECK(web_contents->GetController().NeedsReload());
+ // Restore the saved last active time. By default, the last active time of a
+ // WebContent is initially set to the creation time of the tab, which is not
+ // necessarly the same as the loading time. This makes sure that the state
+ // is preserved between restores.
+ web_contents->SetLastActiveTime(tab.last_active_time);
+
return web_contents;
}
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | chrome/browser/sessions/session_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698