Commit 2e9c65ce authored by Patrick Noland's avatar Patrick Noland Committed by Commit Bot

Destroy mOptionalButtonController in TopToolbarCoordinator#destroy

Bug: 1069829
Change-Id: Ia78655f876347774423a26cfa98b8b363d498c87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2148025Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759010}
parent 25421658
...@@ -72,7 +72,7 @@ public class TopToolbarCoordinator implements Toolbar { ...@@ -72,7 +72,7 @@ public class TopToolbarCoordinator implements Toolbar {
private @Nullable StartSurfaceToolbarCoordinator mStartSurfaceToolbarCoordinator; private @Nullable StartSurfaceToolbarCoordinator mStartSurfaceToolbarCoordinator;
private final IdentityDiscController mIdentityDiscController; private final IdentityDiscController mIdentityDiscController;
private final OptionalBrowsingModeButtonController mOptionalButtonController; private OptionalBrowsingModeButtonController mOptionalButtonController;
private HomepageManager.HomepageStateListener mHomepageStateListener = private HomepageManager.HomepageStateListener mHomepageStateListener =
new HomepageManager.HomepageStateListener() { new HomepageManager.HomepageStateListener() {
...@@ -203,6 +203,11 @@ public class TopToolbarCoordinator implements Toolbar { ...@@ -203,6 +203,11 @@ public class TopToolbarCoordinator implements Toolbar {
} else if (mStartSurfaceToolbarCoordinator != null) { } else if (mStartSurfaceToolbarCoordinator != null) {
mStartSurfaceToolbarCoordinator.destroy(); mStartSurfaceToolbarCoordinator.destroy();
} }
if (mOptionalButtonController != null) {
mOptionalButtonController.destroy();
mOptionalButtonController = null;
}
} }
@Override @Override
......
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