Currently there is no easy way to know whether we are during session restore or not, so it is necessary to add some signals to do so.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1b8597354a9400f5708d6e1476a51aff1b79ef15 commit 1b8597354a9400f5708d6e1476a51aff1b79ef15 Author: ducbui <ducbui@google.com> Date: Tue Jun 27 17:06:38 2017 Add signals that mark the start and end of session restore. Currently, there is no easy way to know whether we are during session restore or not, so it is necessary to add some signals to do so. Since the TabLoader lifetime is equal to the session restore, I made TabLoader to signal the start/end of session restore to the global TabManager. BUG= 733012 Review-Url: https://codereview.chromium.org/2935183002 Cr-Commit-Position: refs/heads/master@{#482654} [modify] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/resource_coordinator/tab_manager.cc [modify] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/resource_coordinator/tab_manager.h [modify] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/resource_coordinator/tab_manager_unittest.cc [modify] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/sessions/session_restore.cc [modify] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/sessions/session_restore.h [add] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/sessions/session_restore_observer.h [add] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/sessions/session_restore_observer_unittest.cc [modify] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/browser/sessions/tab_loader.cc [modify] https://crrev.com/1b8597354a9400f5708d6e1476a51aff1b79ef15/chrome/test/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bf1f56937292f77b1000abaac18658e3bf5ada50 commit bf1f56937292f77b1000abaac18658e3bf5ada50 Author: Duc Bui <ducbui@google.com> Date: Wed Jul 19 14:42:07 2017 [TabManager] Fix Session restore started signal Move the Start signal from TabLoader constructor to earlier points. TabLoader is created after navigation started therefore the PageLoadMetricsObserver is created before the current session restore started signal (only when browser side navigation is enabled). This CL moves the signal earlier such that the Session restore started signal is always invoked before any PageLoadMetricsObserver creation. This CL also adds support for RestoreForeignSession. Design doc: https://docs.google.com/a/google.com/document/d/1sS1WO2rp6M8g1Uco1GMsyqr5wsuJjQzA9RTgrNZQTxA/edit?usp=sharing BUG: chromium:733012 Change-Id: I23373e802c1a37226e4d48395b6954c630ff0c5f Reviewed-on: https://chromium-review.googlesource.com/564343 Reviewed-by: Zhen Wang <zhenw@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Duc Bui <ducbui@google.com> Cr-Commit-Position: refs/heads/master@{#487853} [modify] https://crrev.com/bf1f56937292f77b1000abaac18658e3bf5ada50/chrome/browser/resource_coordinator/tab_manager_unittest.cc [modify] https://crrev.com/bf1f56937292f77b1000abaac18658e3bf5ada50/chrome/browser/sessions/session_restore.cc [modify] https://crrev.com/bf1f56937292f77b1000abaac18658e3bf5ada50/chrome/browser/sessions/session_restore.h [modify] https://crrev.com/bf1f56937292f77b1000abaac18658e3bf5ada50/chrome/browser/sessions/session_restore_observer.h [modify] https://crrev.com/bf1f56937292f77b1000abaac18658e3bf5ada50/chrome/browser/sessions/session_restore_observer_unittest.cc [modify] https://crrev.com/bf1f56937292f77b1000abaac18658e3bf5ada50/chrome/browser/sessions/tab_loader.cc
Comment 1 by shaseley@google.com
, Jun 19 2017