Commit 377c904c authored by Andy Lu's avatar Andy Lu Committed by Commit Bot

Add a completion handler call back in openSelectedTabInMode

completion should be called in every branch of the function, and it was not in this one,
which is a bug. Separated out from CL: https://chromium-review.googlesource.com/c/chromium/src/+/2236243
so that in case of reverting, this change can stay.

Change-Id: If1cf0522b492e8c240253e89432f16d21916da70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2320133
Commit-Queue: Andy Lu <andyhylu@google.com>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Reviewed-by: default avatarGuillaume Jenkins <gujen@google.com>
Cr-Commit-Position: refs/heads/master@{#792327}
parent f8755f0f
......@@ -1587,6 +1587,13 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
dismissWithNewTabAnimationToBrowser:targetInterface.browser
withUrlLoadParams:urlLoadParams
atIndex:tabIndex];
// In this particular usage, there should be no postOpeningAction,
// as triggering voice search while there are multiple windows opened is probably
// a bad idea both technically and as a user experience.
// It should be the caller duty to not set a completion if they don't need it.
if (completion) {
completion();
}
}
} else {
if (!self.currentInterface.viewController.presentedViewController) {
......
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