Reland "[macOS] Make the History menu work in the zero-profile state"
This is a reland of commit 172989e8 Original change's description: > [macOS] Make the History menu work in the zero-profile state > > Specifically, when the last profile is destroyed, the current state of > the menu is preserved. When the user clicks a menu item to open a recent > history entry, or to restore a window/tab/group, the profile is loaded > from disk before performing the operation. > > - When the last Profile is destroyed, don't clear the History menu. > Instead, leave the menu as it is, and keep the bridge. > HistoryMenuBridge still clears any active observers, in > HistoryMenuBridge::OnProfileWillBeDestroyed(). > > - HistoryMenuBridge has ScopedProfileKeepAlives. These keepalives > remain active until the History menu is populated, so opening and > closing a window quickly doesn't leave an empty menu. > > - HistoryMenuCocoaController uses RunInProfileSafely(), so it can > execute actions even if the Profile was deleted. > > - Tweak TabRestoreServiceHelper, so it can find entries by > `original_id`. Unlike `id`, this SessionID is preserved across > Profile loads. > > Bug: 1332984 > Change-Id: I17c08507ab70a3ffa89b18fe6d07aecbdc340025 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3714211 > Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org> > Reviewed-by:Avi Drissman <avi@chromium.org> > Reviewed-by:
Stefan Kuhne <skuhne@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1040998} Bug: 1332984, 1358277 Change-Id: I5058c3da374b69399c1f30b498673617235ae8e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3867486 Reviewed-by:
Stefan Kuhne <skuhne@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Cr-Commit-Position: refs/heads/main@{#1041591}
Loading
Please register or sign in to comment