Commit da9de849 authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

Clear the callback ID when refreshing chrome://welcome-win10

This is to avoid the possible race when the page is
refreshed (so the callback id is now invalid) and the result
of GetIsPinnedToTaskbarState() from the previous javascript
call is received before the current page calls
getPinnedToTaskbarState().

Bug: 842925
Change-Id: I41e8cd3a40d22f98f020eb7bd02487713a62df98
Reviewed-on: https://chromium-review.googlesource.com/1058929Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558845}
parent fd4eaf27
......@@ -99,6 +99,10 @@ void WelcomeWin10Handler::RegisterMessages() {
base::Unretained(this)));
}
void WelcomeWin10Handler::OnJavascriptDisallowed() {
pinned_state_callback_id_.clear();
}
void WelcomeWin10Handler::HandleGetPinnedToTaskbarState(
const base::ListValue* args) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
......
......@@ -25,6 +25,7 @@ class WelcomeWin10Handler : public content::WebUIMessageHandler {
// content::WebUIMessageHandler:
void RegisterMessages() override;
void OnJavascriptDisallowed() override;
private:
// Handlers for javascript calls.
......
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