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

Issue 2547073002: Fix race issue in ArcAuthService. (Closed)

Created:
4 years ago by hidehiko
Modified:
4 years ago
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, yusukes+watch_chromium.org, hidehiko+watch_chromium.org, khmel+watch_chromium.org, lhchavez+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org, khmel, Sergey Poromov
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race issue in ArcAuthService. ArcAuthService had an race issue, around manual "SIGN IN" click flow. This CL fixes it by moving everyting into ArcManualAuthCodeFetcher implementation, and make it cancellable by deleting. For that purpose, this CL introduces ArcAuthFetcher interface, and has (old) ArcAuthCodeFetcher and ArcRobotAuth implement it, as well. Along the change, these are renamed into ArcBackgroundAuthCodeFetcher and ArcRobotAuthCodeFetchere respectively. Note that, on error page, there still remains a race issue that a user can click "TRY AGAIN" button quickly, so that OnRetryClicked() can be invoked twice (or more) quickly. This problem will be addressed in another CL. BUG=657687 BUG=b/31079732 TEST=Ran on test device. Ran bots. Committed: https://crrev.com/f44a3339cce8208c9b308fe95d99bc5faf7fbfc5 Cr-Commit-Position: refs/heads/master@{#436349}

Patch Set 1 #

Total comments: 7

Patch Set 2 : rebase #

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -725 lines) Patch
M chrome/browser/chromeos/BUILD.gn View 1 2 chunks +7 lines, -4 lines 0 comments Download
D chrome/browser/chromeos/arc/arc_auth_code_fetcher.h View 1 chunk +0 lines, -71 lines 0 comments Download
D chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc View 1 chunk +0 lines, -170 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_auth_service.h View 3 chunks +5 lines, -28 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_auth_service.cc View 1 2 7 chunks +31 lines, -98 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_session_manager.cc View 2 chunks +8 lines, -2 lines 0 comments Download
A chrome/browser/chromeos/arc/auth/arc_auth_code_fetcher.h View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
A + chrome/browser/chromeos/arc/auth/arc_background_auth_code_fetcher.h View 5 chunks +17 lines, -17 lines 0 comments Download
A + chrome/browser/chromeos/arc/auth/arc_background_auth_code_fetcher.cc View 6 chunks +15 lines, -11 lines 0 comments Download
A chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.h View 1 2 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
D chrome/browser/chromeos/arc/auth/arc_robot_auth.h View 1 chunk +0 lines, -45 lines 0 comments Download
D chrome/browser/chromeos/arc/auth/arc_robot_auth.cc View 1 chunk +0 lines, -87 lines 0 comments Download
D chrome/browser/chromeos/arc/auth/arc_robot_auth_browsertest.cc View 1 chunk +0 lines, -178 lines 0 comments Download
A chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher.h View 1 2 1 chunk +51 lines, -0 lines 0 comments Download
A + chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher.cc View 3 chunks +9 lines, -7 lines 0 comments Download
A + chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc View 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/test/BUILD.gn View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 24 (15 generated)
hidehiko
PTAL: lhchavez@. FYI: khmel@, poromov@.
4 years ago (2016-12-02 17:52:13 UTC) #4
Luis Héctor Chávez
https://codereview.chromium.org/2547073002/diff/1/chrome/browser/chromeos/arc/arc_auth_service.cc File chrome/browser/chromeos/arc/arc_auth_service.cc (right): https://codereview.chromium.org/2547073002/diff/1/chrome/browser/chromeos/arc/arc_auth_service.cc#newcode231 chrome/browser/chromeos/arc/arc_auth_service.cc:231: // Optionally retrive auth code in silent mode. nit: ...
4 years ago (2016-12-03 01:27:54 UTC) #7
Luis Héctor Chávez
https://codereview.chromium.org/2547073002/diff/1/chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc File chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc (right): https://codereview.chromium.org/2547073002/diff/1/chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc#newcode66 chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc:66: FetchInternal(); On 2016/12/03 01:27:54, Luis Héctor Chávez wrote: > ...
4 years ago (2016-12-03 14:24:26 UTC) #8
hidehiko
Thank you for reivew. PTAL. https://codereview.chromium.org/2547073002/diff/1/chrome/browser/chromeos/arc/arc_auth_service.cc File chrome/browser/chromeos/arc/arc_auth_service.cc (right): https://codereview.chromium.org/2547073002/diff/1/chrome/browser/chromeos/arc/arc_auth_service.cc#newcode231 chrome/browser/chromeos/arc/arc_auth_service.cc:231: // Optionally retrive auth ...
4 years ago (2016-12-05 06:00:31 UTC) #11
Luis Héctor Chávez
lgtm just change the commit summary to reflect that this does not fully fix the ...
4 years ago (2016-12-05 16:19:05 UTC) #14
hidehiko
Updated commit message. Thank you for review! Submitting.
4 years ago (2016-12-05 18:06:11 UTC) #17
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/2547073002/40001
4 years ago (2016-12-05 18:06:33 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-05 18:13:03 UTC) #22
commit-bot: I haz the power
4 years ago (2016-12-05 18:17:00 UTC) #24
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f44a3339cce8208c9b308fe95d99bc5faf7fbfc5
Cr-Commit-Position: refs/heads/master@{#436349}

Powered by Google App Engine
This is Rietveld 408576698