Commit 2d1353a3 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Commit Bot

[multiball] Group up per-window shutdown code

Groups all per-window shutdown code together and moves it before the
other shutdown code to match expected behaviour of shutdown in
multiwindow world.

Bug: none
Change-Id: I7abf63beecd3d2d6c0479da9c9a6f31477f3ae53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2084595Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746364}
parent ac77be75
......@@ -776,12 +776,21 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData(
}
- (void)stopChromeMain {
// This code is per-window.
// Teardown UI state that is associated with scenes.
[self.sceneController teardownUI];
[_mainCoordinator stop];
_mainCoordinator = nil;
// Invariant: The UI is stopped before the model is shutdown.
DCHECK(!_mainCoordinator);
[self.browserViewWrangler shutdown];
self.browserViewWrangler = nil;
// End of per-window code.
[_spotlightManager shutdown];
_spotlightManager = nil;
......@@ -796,11 +805,6 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData(
self.mainBrowserState));
}
// Invariant: The UI is stopped before the model is shutdown.
DCHECK(!_mainCoordinator);
[self.browserViewWrangler shutdown];
self.browserViewWrangler = nil;
_extensionSearchEngineDataUpdater = nullptr;
ios::GetChromeBrowserProvider()
......
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