Index: chrome/browser/sessions/session_service.cc |
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc |
index 99de7204e61bdf7d52e078b0e979d175b29f58eb..596c493dda5f53fe76d0767c91f9545371f56155 100644 |
--- a/chrome/browser/sessions/session_service.cc |
+++ b/chrome/browser/sessions/session_service.cc |
@@ -487,6 +487,16 @@ void SessionService::SetTabExtensionAppID( |
tab_id, extension_app_id).Pass()); |
} |
+void SessionService::SetActivationTime(const SessionID& window_id, |
+ const SessionID& tab_id, |
+ base::TimeTicks activation_time) { |
+ if (!ShouldTrackChangesToWindow(window_id)) |
+ return; |
+ |
+ ScheduleCommand( |
sky
2015/05/12 21:25:30
Don't you want to gate this by SessionRestore::Get
Georges Khalil
2015/05/15 16:55:30
Good idea. I'm actually going to gate the call to
|
+ sessions::CreateActivationTimeCommand(tab_id, activation_time).Pass()); |
+} |
+ |
base::CancelableTaskTracker::TaskId SessionService::GetLastSession( |
const SessionCallback& callback, |
base::CancelableTaskTracker* tracker) { |
@@ -727,6 +737,12 @@ void SessionService::BuildCommandsForTab(const SessionID& window_id, |
sessions::CreatePinnedStateCommand(session_id, true)); |
} |
+ // This works because we are persisting the last activation when restoring |
sky
2015/05/12 21:25:30
I don't understand this comment. It likely can be
Georges Khalil
2015/05/15 16:55:30
Removed.
|
+ // tabs. |
+ base_session_service_->AppendRebuildCommand( |
+ sessions::CreateActivationTimeCommand(session_id, |
+ tab->GetLastActiveTime())); |
+ |
extensions::TabHelper* extensions_tab_helper = |
extensions::TabHelper::FromWebContents(tab); |
if (extensions_tab_helper->extension_app()) { |