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

Unified Diff: chrome/browser/resource_coordinator/tab_manager.h

Issue 2935183002: [TabMetrics] Add signals that mark the start and end of session restore. (Closed)
Patch Set: Use OnSessionRestore[Started,Ended]() directly in TabLoader. Created 3 years, 6 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/resource_coordinator/tab_manager.h
diff --git a/chrome/browser/resource_coordinator/tab_manager.h b/chrome/browser/resource_coordinator/tab_manager.h
index 3cd08c9805cdf1b94d247b258eccbf52a03d346f..90e9f4d8446b5b92477ac9f0a3cd90fe9c4bd6a9 100644
--- a/chrome/browser/resource_coordinator/tab_manager.h
+++ b/chrome/browser/resource_coordinator/tab_manager.h
@@ -156,6 +156,11 @@ class TabManager : public TabStripModelObserver {
// the WebContents could be deleted if the user closed the tab.
static int64_t IdFromWebContents(content::WebContents* web_contents);
+ void OnSessionRestoreStarted();
+ void OnSessionRestoreEnded();
+
+ bool IsInSessionRestore() const { return in_session_restore_; }
+
private:
FRIEND_TEST_ALL_PREFIXES(TabManagerTest, PurgeBackgroundRenderer);
FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ActivateTabResetPurgeState);
@@ -383,6 +388,8 @@ class TabManager : public TabStripModelObserver {
// List of observers that will receive notifications on state changes.
base::ObserverList<TabManagerObserver> observers_;
+ bool in_session_restore_;
+
// Weak pointer factory used for posting delayed tasks.
base::WeakPtrFactory<TabManager> weak_ptr_factory_;
« no previous file with comments | « no previous file | chrome/browser/resource_coordinator/tab_manager.cc » ('j') | chrome/browser/sessions/tab_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698