Commit b803d816 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Save current session on page commit

Before this CL, the current session was saved when the page was loaded.
The page is loaded when the main frame has finished loading its content.
When there is a push state event, this callback isn't called.
This CL changes it to store the current session when the navigation is
finished, which happens when the item is committed.

Bug: 998563
Change-Id: Ibc77d38cf4e130477471161d28a4d6cb6c03365f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1778483Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarAli Juma <ajuma@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694732}
parent 4973ed62
......@@ -3539,11 +3539,11 @@ NSString* const kBrowserViewControllerSnackbarCategory =
// Stop any Find in Page searches and close the find bar when navigating to a
// new page.
[self closeFindInPage];
[self.tabModel saveSessionImmediately:NO];
}
- (void)webState:(web::WebState*)webState didLoadPageWithSuccess:(BOOL)success {
[_toolbarUIUpdater updateState];
[self.tabModel saveSessionImmediately:NO];
if ([self canShowTabStrip]) {
UIUserInterfaceSizeClass sizeClass =
self.view.window.traitCollection.horizontalSizeClass;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment