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

Issue 2204223005: Blimp OAuth2 token retreival on application start up. (Closed)

Created:
4 years, 4 months ago by xingliu
Modified:
4 years, 4 months ago
CC:
chromium-reviews, anandc+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, dtrainor+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Blimp OAuth2 token retreival on application start up. Previously Blimp runs in its own app, and we have our own token source implementation. This cl implement the OAuth2 token flow in c++. There is a known issue that connect must be called after account seeding in android layer, or token request can be flaky since account seeding might cause request canceled. BUG=624457 Committed: https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4 Cr-Commit-Position: refs/heads/master@{#412923}

Patch Set 1 #

Patch Set 2 : Add deps file. #

Total comments: 16

Patch Set 3 : Move authenticator to c++. #

Patch Set 4 : Build rules for dummy core. #

Patch Set 5 : Unit test of authenticator in c++. #

Patch Set 6 : Add two line in unittest. #

Patch Set 7 : Fix build config. #

Total comments: 38

Patch Set 8 : Rename to IdentitySource, fix based on reviews. #

Patch Set 9 : Fix compiling without blimp flag. #

Patch Set 10 : Rebase to resolve conflicts. #

Patch Set 11 : Fix the unittest just moved to session. #

Patch Set 12 : Add some deps only for gn deps check script. #

Total comments: 42

Patch Set 13 : Fixes based on code review. #

Patch Set 14 : More fixes based on review. #

Patch Set 15 : Hooked up auth token to assignment source code in BlimpContextImpl. #

Patch Set 16 : Renamed BlimpError to AuthError. #

Patch Set 17 : Fix unittests compiling. #

Total comments: 12

Patch Set 18 : Fixes for code review. #

Patch Set 19 : Fix test code gn file, also rename some vars #

Patch Set 20 : Minor fix. #

Total comments: 6

Patch Set 21 : Fixes for nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+561 lines, -15 lines) Patch
M blimp/client/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M blimp/client/core/android/blimp_client_context_impl_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M blimp/client/core/android/blimp_client_context_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +4 lines, -0 lines 0 comments Download
M blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -0 lines 0 comments Download
M blimp/client/core/android/java/src/org/chromium/blimp/core/DummyBlimpClientContext.java View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M blimp/client/core/blimp_client_context_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +8 lines, -1 line 0 comments Download
M blimp/client/core/blimp_client_context_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +16 lines, -1 line 0 comments Download
M blimp/client/core/dummy_blimp_client_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M blimp/client/core/dummy_blimp_client_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M blimp/client/core/session/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +14 lines, -6 lines 0 comments Download
A blimp/client/core/session/identity_source.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +79 lines, -0 lines 0 comments Download
A blimp/client/core/session/identity_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +103 lines, -0 lines 0 comments Download
A blimp/client/core/session/identity_source_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +184 lines, -0 lines 0 comments Download
M blimp/client/public/android/java/src/org/chromium/blimp_public/BlimpClientContext.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -0 lines 0 comments Download
M blimp/client/public/blimp_client_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/client/public/blimp_client_context_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +15 lines, -0 lines 0 comments Download
M blimp/client/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M blimp/client/test/test_blimp_client_context_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +11 lines, -0 lines 0 comments Download
M blimp/client/test/test_blimp_client_context_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +15 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +46 lines, -2 lines 0 comments Download
M chrome/browser/android/blimp/chrome_blimp_client_context_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 98 (74 generated)
xingliu
OAuth token retrieval. This CL only gets the token, no sign in or UI work ...
4 years, 4 months ago (2016-08-04 18:53:09 UTC) #3
David Trainor- moved to gerrit
https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/BUILD.gn File blimp/client/core/BUILD.gn (right): https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/BUILD.gn#newcode169 blimp/client/core/BUILD.gn:169: android_library("auth_java") { Hmm I wonder if we should just ...
4 years, 4 months ago (2016-08-05 15:49:09 UTC) #12
nyquist
https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/BUILD.gn File blimp/client/core/BUILD.gn (right): https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/BUILD.gn#newcode169 blimp/client/core/BUILD.gn:169: android_library("auth_java") { On 2016/08/05 15:49:09, David Trainor wrote: > ...
4 years, 4 months ago (2016-08-05 17:05:08 UTC) #13
nyquist
https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/BUILD.gn File blimp/client/core/BUILD.gn (right): https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/BUILD.gn#newcode169 blimp/client/core/BUILD.gn:169: android_library("auth_java") { On 2016/08/05 17:05:07, nyquist wrote: > On ...
4 years, 4 months ago (2016-08-05 17:09:31 UTC) #14
xingliu
Discussion on review feedback. https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/android/java/src/org/chromium/blimp/core/auth/Authenticator.java File blimp/client/core/android/java/src/org/chromium/blimp/core/auth/Authenticator.java (right): https://codereview.chromium.org/2204223005/diff/20001/blimp/client/core/android/java/src/org/chromium/blimp/core/auth/Authenticator.java#newcode48 blimp/client/core/android/java/src/org/chromium/blimp/core/auth/Authenticator.java:48: public void tokenUnavailable(boolean isTransientError) { ...
4 years, 4 months ago (2016-08-05 17:17:00 UTC) #15
xingliu
Recent several patches includes: #1. Moved token retrieval code to c++, into authenticator.cc. #2. Unit ...
4 years, 4 months ago (2016-08-09 04:17:45 UTC) #27
nyquist
https://codereview.chromium.org/2204223005/diff/120001/blimp/client/core/BUILD.gn File blimp/client/core/BUILD.gn (right): https://codereview.chromium.org/2204223005/diff/120001/blimp/client/core/BUILD.gn#newcode94 blimp/client/core/BUILD.gn:94: source_set("auth") { Could we move this into //blimp/client/core/session ? ...
4 years, 4 months ago (2016-08-10 01:20:34 UTC) #34
nyquist
https://codereview.chromium.org/2204223005/diff/120001/blimp/client/core/authenticator.h File blimp/client/core/authenticator.h (right): https://codereview.chromium.org/2204223005/diff/120001/blimp/client/core/authenticator.h#newcode16 blimp/client/core/authenticator.h:16: // Authenticator handles OAuth2 token request and forward user ...
4 years, 4 months ago (2016-08-10 16:48:56 UTC) #35
xingliu
Thanks for the great review. Fixes based on the review. https://codereview.chromium.org/2204223005/diff/120001/blimp/client/core/BUILD.gn File blimp/client/core/BUILD.gn (right): https://codereview.chromium.org/2204223005/diff/120001/blimp/client/core/BUILD.gn#newcode94 ...
4 years, 4 months ago (2016-08-10 21:03:15 UTC) #36
xingliu
Sorry that I forgot to submit a patch after a rebase.
4 years, 4 months ago (2016-08-10 21:05:13 UTC) #37
xingliu
To rogerta: Please help review gaia related code, blimp/client/core/session/identity_source.h blimp/client/core/session/identity_source.cc chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
4 years, 4 months ago (2016-08-12 02:08:16 UTC) #51
nyquist
this looks great! awesome that you could do this in C++! https://codereview.chromium.org/2204223005/diff/220001/blimp/client/core/android/blimp_client_context_impl_android.cc File blimp/client/core/android/blimp_client_context_impl_android.cc (right): ...
4 years, 4 months ago (2016-08-12 05:47:05 UTC) #52
xingliu
Thanks for the review, fixed couple of issues based on the review. https://codereview.chromium.org/2204223005/diff/220001/blimp/client/core/android/blimp_client_context_impl_android.cc File blimp/client/core/android/blimp_client_context_impl_android.cc ...
4 years, 4 months ago (2016-08-12 17:58:28 UTC) #55
xingliu
Pass the token to assignment source code in context impl. Fixes for reviews. https://codereview.chromium.org/2204223005/diff/220001/blimp/client/core/blimp_client_context_impl.cc File ...
4 years, 4 months ago (2016-08-12 21:11:18 UTC) #58
nyquist
this mostly looks good! awesome! https://codereview.chromium.org/2204223005/diff/320001/blimp/client/core/session/identity_source.cc File blimp/client/core/session/identity_source.cc (right): https://codereview.chromium.org/2204223005/diff/320001/blimp/client/core/session/identity_source.cc#newcode56 blimp/client/core/session/identity_source.cc:56: token_callback_.Run(access_token); Should this reset ...
4 years, 4 months ago (2016-08-16 18:38:06 UTC) #71
xingliu
Thanks for the review, please help to take a look. Also @Roger, friendly ping, please ...
4 years, 4 months ago (2016-08-17 00:32:25 UTC) #78
Roger Tawa OOO till Jul 10th
lgtm blimp/client/DEPS
4 years, 4 months ago (2016-08-17 17:21:44 UTC) #83
David Trainor- moved to gerrit
lgtm % tommy. https://codereview.chromium.org/2204223005/diff/380001/blimp/client/core/session/identity_source_unittest.cc File blimp/client/core/session/identity_source_unittest.cc (right): https://codereview.chromium.org/2204223005/diff/380001/blimp/client/core/session/identity_source_unittest.cc#newcode122 blimp/client/core/session/identity_source_unittest.cc:122: DCHECK_EQ(auth.Succeeded(), 0); Can we add a ...
4 years, 4 months ago (2016-08-18 17:27:07 UTC) #84
nyquist
lgtm % nit and dtrainor@ https://codereview.chromium.org/2204223005/diff/380001/blimp/client/core/session/identity_source.h File blimp/client/core/session/identity_source.h (right): https://codereview.chromium.org/2204223005/diff/380001/blimp/client/core/session/identity_source.h#newcode33 blimp/client/core/session/identity_source.h:33: void Connect(); Nit: Could ...
4 years, 4 months ago (2016-08-18 17:43:52 UTC) #85
nyquist
https://codereview.chromium.org/2204223005/diff/380001/blimp/client/core/session/identity_source.h File blimp/client/core/session/identity_source.h (right): https://codereview.chromium.org/2204223005/diff/380001/blimp/client/core/session/identity_source.h#newcode36 blimp/client/core/session/identity_source.h:36: void SetTokenCallback(const TokenCallback& callback); Could you move this to ...
4 years, 4 months ago (2016-08-18 17:46:46 UTC) #86
xingliu
Fixed all nits issues. Will put the CL into commit queue soon. https://codereview.chromium.org/2204223005/diff/380001/blimp/client/core/session/identity_source.h File blimp/client/core/session/identity_source.h ...
4 years, 4 months ago (2016-08-18 18:29:22 UTC) #87
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/2204223005/400001
4 years, 4 months ago (2016-08-18 20:16:50 UTC) #94
commit-bot: I haz the power
Committed patchset #21 (id:400001)
4 years, 4 months ago (2016-08-18 20:22:47 UTC) #96
commit-bot: I haz the power
4 years, 4 months ago (2016-08-18 20:24:44 UTC) #98
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4
Cr-Commit-Position: refs/heads/master@{#412923}

Powered by Google App Engine
This is Rietveld 408576698