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

Issue 2761983002: [Remoting Android] Fix crash caused by fetchAuthToken() (Closed)

Created:
3 years, 9 months ago by Yuwei
Modified:
3 years, 9 months ago
Reviewers:
Sergey Ulanov, nicholss
CC:
chromium-reviews, agrieve+watch_chromium.org, chromoting-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Remoting Android] Fix crash caused by fetchAuthToken() Previously auth token was only fetched after the account switcher set the account. A recent refactoring makes the app attempt to fetch the auth token even before the account is set, so the fetchAuthToken() function just throws an exception and crashes the app. Since we are pretty sure that the Java code will soon feed the logger with the auth code once the account is set, it's safe to fix this by loosening the check to just a warning log. Alternatively we can remove the immediate RequestAuthTokenForLogger() call from ChromotingClientRuntime and make the logger request the auth token before it tries to send out the logs. It depends on how the iOS client wants to provide the auth token. BUG=703381 Review-Url: https://codereview.chromium.org/2761983002 Cr-Commit-Position: refs/heads/master@{#458515} Committed: https://chromium.googlesource.com/chromium/src/+/ced631a3b4de3fd68d98ecc1620d76b47a5ea9b2

Patch Set 1 #

Total comments: 2

Patch Set 2 : Reviewer's Feedback / Add Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java View 1 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 13 (6 generated)
Yuwei
PTAL. Thanks! Please also see the alternative solution mentioned in the description.
3 years, 9 months ago (2017-03-20 22:40:07 UTC) #3
nicholss
On 2017/03/20 22:40:07, Yuwei wrote: > PTAL. Thanks! > > Please also see the alternative ...
3 years, 9 months ago (2017-03-21 14:37:33 UTC) #4
Sergey Ulanov
lgtm https://codereview.chromium.org/2761983002/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java File remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java (right): https://codereview.chromium.org/2761983002/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java#newcode62 remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java:62: Log.w(TAG, "Account is not set before fetching the ...
3 years, 9 months ago (2017-03-21 18:39:37 UTC) #5
Yuwei
On 2017/03/21 14:37:33, nicholss wrote: > On 2017/03/20 22:40:07, Yuwei wrote: > > PTAL. Thanks! ...
3 years, 9 months ago (2017-03-21 18:52:44 UTC) #6
Yuwei
Thanks! https://codereview.chromium.org/2761983002/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java File remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java (right): https://codereview.chromium.org/2761983002/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java#newcode62 remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java:62: Log.w(TAG, "Account is not set before fetching the ...
3 years, 9 months ago (2017-03-21 19:02:24 UTC) #7
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/2761983002/20001
3 years, 9 months ago (2017-03-21 19:03:42 UTC) #10
commit-bot: I haz the power
3 years, 9 months ago (2017-03-21 19:42:34 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/ced631a3b4de3fd68d98ecc1620d...

Powered by Google App Engine
This is Rietveld 408576698