Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Issue 2277723003: [Remoting Android] Fix OAuthTokenConsumer's thread safety issue (Closed)

Created:
4 years, 3 months ago by Yuwei
Modified:
4 years, 3 months ago
Reviewers:
Lambros
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Remoting Android] Fix OAuthTokenConsumer's thread safety issue OAuthTokenConsumer.revokeLatestToken() revokes the token on the background thread and calls the callback directly on that thread once it is done. This would be potentially thread unsafe if the caller doesn't realize the callback will be called on a non-main thread. Currently we don't see any bug related to this problem since the only caller of revokeLatestToken() passes in null as the callback. This CL makes revokeLatestToken() post a task to the main thread to run the callback when the token is revoked. Committed: https://crrev.com/e8f9faf5a2ace617a7ce1d775c96ead0df0a76d4 Cr-Commit-Position: refs/heads/master@{#414268}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -6 lines) Patch
M remoting/android/java/src/org/chromium/chromoting/OAuthTokenConsumer.java View 4 chunks +26 lines, -6 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
Yuwei
ptal
4 years, 3 months ago (2016-08-24 22:52:57 UTC) #2
Lambros
lgtm
4 years, 3 months ago (2016-08-24 23:18:23 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2277723003/1
4 years, 3 months ago (2016-08-24 23:20:47 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-08-25 02:27:16 UTC) #8
commit-bot: I haz the power
4 years, 3 months ago (2016-08-25 02:30:36 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/e8f9faf5a2ace617a7ce1d775c96ead0df0a76d4
Cr-Commit-Position: refs/heads/master@{#414268}

Powered by Google App Engine
This is Rietveld 408576698