Commit 87a64b70 authored by liberato@chromium.org's avatar liberato@chromium.org Committed by Commit Bot

Ignore multiple calls to AndroidOverlay callbacks.

Occasionally, MojoAndroidOverlay will receive more than one failure
message from the server.  Ignore all but the first.

Bug: 861719
Change-Id: I38a98108bad29cacdce61863c0a8cd42eb8feb2e
Reviewed-on: https://chromium-review.googlesource.com/1161219Reviewed-by: default avatarThomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580380}
parent b9a79669
......@@ -65,8 +65,14 @@ struct MEDIA_EXPORT AndroidOverlayConfig {
bool power_efficient = false;
// Convenient helpers since the syntax is weird.
void is_ready(AndroidOverlay* overlay) { std::move(ready_cb).Run(overlay); }
void is_failed(AndroidOverlay* overlay) { std::move(failed_cb).Run(overlay); }
void is_ready(AndroidOverlay* overlay) {
if (ready_cb)
std::move(ready_cb).Run(overlay);
}
void is_failed(AndroidOverlay* overlay) {
if (failed_cb)
std::move(failed_cb).Run(overlay);
}
ReadyCB ready_cb;
FailedCB failed_cb;
......
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