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

Issue 1618193003: arc: Pass auth token from Chrome to ARC instance. (Closed)

Created:
4 years, 11 months ago by khmel
Modified:
3 years, 9 months ago
CC:
chromium-reviews, sadrul, dzhioev+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, kalyank, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

arc: Fetch and pass auth code from Chrome to ARC instance. This supports communication via Google api to get an auth code for GMS Core client and pass it to ARC instance. There are two types of getting the auth code. Firstly, we try to get it silently and secondary, in case when an additional input is required from the user WebView dialog is shown. Changed logic of starting ARC instance. Now its start is controlled by ArcAuthService after communication with Google auth servers. BUG=571146 TEST=Provide additional unit_tests. TEST=logcat shows that auth code is passed to ARC instance. Both modes are tested: silent and WebView based (can be forced by re-imaging) Committed: https://crrev.com/0d5f977b77bc8d3c9f9dd78724fe7eecd6066e73 Cr-Commit-Position: refs/heads/master@{#372222}

Patch Set 1 #

Total comments: 2

Patch Set 2 : minor formating #

Total comments: 12

Patch Set 3 : Rebased, refactored OptInManager to ArcAuthService #

Total comments: 13

Patch Set 4 : rename token->code #

Patch Set 5 : Refactored. Added LSO UI #

Total comments: 13

Patch Set 6 : use gaia_auth_fetcher. comments addressed #

Patch Set 7 : fix accidental change #

Total comments: 28

Patch Set 8 : comments addressed #

Patch Set 9 : rebased #

Total comments: 33

Patch Set 10 : #

Patch Set 11 : Use DCHEC_NE/EQ #

Total comments: 1

Patch Set 12 : update BUILD.gn #

Unified diffs Side-by-side diffs Delta from patch set Stats (+728 lines, -75 lines) Patch
M chrome/browser/chromeos/arc/arc_auth_service.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +74 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_auth_service.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +157 lines, -2 lines 0 comments Download
A chrome/browser/chromeos/arc/arc_auth_service_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +164 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/arc/arc_auth_ui.h View 1 2 3 4 5 6 7 8 9 1 chunk +76 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/arc/arc_auth_ui.cc View 1 2 3 4 5 6 7 8 9 1 chunk +108 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.h View 3 chunks +0 lines, -22 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc View 3 chunks +0 lines, -40 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M components/arc.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M components/arc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
A components/arc/auth/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
A components/arc/auth/arc_auth_fetcher.h View 1 2 3 4 5 6 7 8 9 1 chunk +63 lines, -0 lines 0 comments Download
A components/arc/auth/arc_auth_fetcher.cc View 1 2 3 4 5 6 7 8 9 1 chunk +59 lines, -0 lines 0 comments Download
M components/arc/test/fake_arc_bridge_service.cc View 1 chunk +7 lines, -5 lines 0 comments Download

Messages

Total messages: 42 (14 generated)
khmel
This is first CL to enable opt-in workflow. PTAL https://codereview.chromium.org/1618193003/diff/1/chrome/browser/chromeos/arc/arc_opt_in_manager_impl.cc File chrome/browser/chromeos/arc/arc_opt_in_manager_impl.cc (right): https://codereview.chromium.org/1618193003/diff/1/chrome/browser/chromeos/arc/arc_opt_in_manager_impl.cc#newcode27 chrome/browser/chromeos/arc/arc_opt_in_manager_impl.cc:27: ...
4 years, 11 months ago (2016-01-22 21:55:25 UTC) #2
lhc(google)
https://codereview.chromium.org/1618193003/diff/20001/chrome/browser/chromeos/arc/arc_opt_in_manager_impl.h File chrome/browser/chromeos/arc/arc_opt_in_manager_impl.h (right): https://codereview.chromium.org/1618193003/diff/20001/chrome/browser/chromeos/arc/arc_opt_in_manager_impl.h#newcode24 chrome/browser/chromeos/arc/arc_opt_in_manager_impl.h:24: class ArcOptInManagerImpl : public ArcOptInManager, You should be able ...
4 years, 11 months ago (2016-01-22 22:18:34 UTC) #4
lhc(google)
also, s/Crome/Chrome/ on the issue title/commit message? :P
4 years, 11 months ago (2016-01-22 22:22:50 UTC) #5
khmel
Hi Luis, Thanks for review. I rebased the code and moved ArcOptInManager to the existing ...
4 years, 11 months ago (2016-01-23 00:41:43 UTC) #8
elijahtaylor1
haven't looked in great detail yet, but wanted to get early comments out https://codereview.chromium.org/1618193003/diff/40001/chrome/browser/chromeos/arc/arc_auth_service.cc File ...
4 years, 11 months ago (2016-01-26 01:02:14 UTC) #9
khmel
Hi Elijah, Thanks for review. PTAL https://codereview.chromium.org/1618193003/diff/40001/chrome/browser/chromeos/arc/arc_auth_service.cc File chrome/browser/chromeos/arc/arc_auth_service.cc (right): https://codereview.chromium.org/1618193003/diff/40001/chrome/browser/chromeos/arc/arc_auth_service.cc#newcode24 chrome/browser/chromeos/arc/arc_auth_service.cc:24: "1070009224336-sdh77n7uot3oc99ais00jmuft6sk2fg9.apps.googleusercontent.com"; On 2016/01/26 ...
4 years, 11 months ago (2016-01-26 01:42:04 UTC) #10
khmel
Hi, Originally I decided to split CL into two parts, one for low-level parts and ...
4 years, 11 months ago (2016-01-26 16:17:54 UTC) #11
khmel
PTAL https://codereview.chromium.org/1618193003/diff/80001/chrome/browser/ui/ash/chrome_shell_delegate.h File chrome/browser/ui/ash/chrome_shell_delegate.h (left): https://codereview.chromium.org/1618193003/diff/80001/chrome/browser/ui/ash/chrome_shell_delegate.h#oldcode21 chrome/browser/ui/ash/chrome_shell_delegate.h:21: #if defined(OS_CHROMEOS) This is just revert previous ARC ...
4 years, 11 months ago (2016-01-26 22:00:41 UTC) #14
xiyuan
https://codereview.chromium.org/1618193003/diff/80001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc File chrome/browser/chromeos/arc/arc_auth_fetcher.cc (right): https://codereview.chromium.org/1618193003/diff/80001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc#newcode61 chrome/browser/chromeos/arc/arc_auth_fetcher.cc:61: auth_fetcher_->SetRequestContext(profile_->GetRequestContext()); Looks like the class does not need the ...
4 years, 11 months ago (2016-01-26 23:37:06 UTC) #15
khmel
PTAL https://codereview.chromium.org/1618193003/diff/80001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc File chrome/browser/chromeos/arc/arc_auth_fetcher.cc (right): https://codereview.chromium.org/1618193003/diff/80001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc#newcode61 chrome/browser/chromeos/arc/arc_auth_fetcher.cc:61: auth_fetcher_->SetRequestContext(profile_->GetRequestContext()); On 2016/01/26 23:37:05, xiyuan wrote: > Looks ...
4 years, 11 months ago (2016-01-27 22:36:21 UTC) #16
xiyuan
https://codereview.chromium.org/1618193003/diff/120001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc File chrome/browser/chromeos/arc/arc_auth_fetcher.cc (right): https://codereview.chromium.org/1618193003/diff/120001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc#newcode8 chrome/browser/chromeos/arc/arc_auth_fetcher.cc:8: #include "google_apis/gaia/gaia_auth_fetcher.h" nit: not needed since we included it ...
4 years, 11 months ago (2016-01-27 23:56:06 UTC) #17
khmel
PTAL https://codereview.chromium.org/1618193003/diff/120001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc File chrome/browser/chromeos/arc/arc_auth_fetcher.cc (right): https://codereview.chromium.org/1618193003/diff/120001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc#newcode8 chrome/browser/chromeos/arc/arc_auth_fetcher.cc:8: #include "google_apis/gaia/gaia_auth_fetcher.h" On 2016/01/27 23:56:05, xiyuan wrote: > ...
4 years, 10 months ago (2016-01-28 05:22:09 UTC) #18
xiyuan
lgtm https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc File chrome/browser/chromeos/arc/arc_auth_fetcher.cc (right): https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc#newcode8 chrome/browser/chromeos/arc/arc_auth_fetcher.cc:8: #include "google_apis/gaia/gaia_auth_fetcher.h" nit: The header is still here. ...
4 years, 10 months ago (2016-01-28 16:18:07 UTC) #19
oshima
https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc File chrome/browser/chromeos/arc/arc_auth_fetcher.cc (right): https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_fetcher.cc#newcode42 chrome/browser/chromeos/arc/arc_auth_fetcher.cc:42: "", /* session_index */ std::string() same for other ""s. ...
4 years, 10 months ago (2016-01-28 17:46:41 UTC) #20
elijahtaylor1
components/arc lgtm, overall design lgtm but left details to xiyuan and oshima
4 years, 10 months ago (2016-01-28 18:20:59 UTC) #21
khmel
Hi Mitsuru, Thanks for your review. I moved ArcAuthService to components/arc/auth and did other style ...
4 years, 10 months ago (2016-01-28 19:24:02 UTC) #22
oshima
https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_service.cc File chrome/browser/chromeos/arc/arc_auth_service.cc (right): https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_service.cc#newcode119 chrome/browser/chromeos/arc/arc_auth_service.cc:119: DCHECK(state_ != State::ENABLE); On 2016/01/28 19:24:02, khmel wrote: > ...
4 years, 10 months ago (2016-01-28 20:39:54 UTC) #23
khmel
PTAL https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_service.cc File chrome/browser/chromeos/arc/arc_auth_service.cc (right): https://codereview.chromium.org/1618193003/diff/160001/chrome/browser/chromeos/arc/arc_auth_service.cc#newcode119 chrome/browser/chromeos/arc/arc_auth_service.cc:119: DCHECK(state_ != State::ENABLE); On 2016/01/28 20:39:54, oshima wrote: ...
4 years, 10 months ago (2016-01-28 21:06:01 UTC) #24
oshima
lgtm https://codereview.chromium.org/1618193003/diff/200001/chrome/browser/chromeos/arc/arc_auth_service.cc File chrome/browser/chromeos/arc/arc_auth_service.cc (right): https://codereview.chromium.org/1618193003/diff/200001/chrome/browser/chromeos/arc/arc_auth_service.cc#newcode26 chrome/browser/chromeos/arc/arc_auth_service.cc:26: const char kStateEnable[] = "ENABLE"; While I prefer ...
4 years, 10 months ago (2016-01-28 22:28:38 UTC) #25
khmel
Adding Zel to review components/arc/auth/DEPS. PTAL
4 years, 10 months ago (2016-01-28 22:37:04 UTC) #27
zel
lgtm
4 years, 10 months ago (2016-01-28 22:47:42 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1618193003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1618193003/200001
4 years, 10 months ago (2016-01-28 22:50:04 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/135935)
4 years, 10 months ago (2016-01-28 23:00:20 UTC) #33
oshima
looks like you need to update DEPS
4 years, 10 months ago (2016-01-28 23:20:47 UTC) #34
khmel
On 2016/01/28 23:20:47, oshima wrote: > looks like you need to update DEPS It seems ...
4 years, 10 months ago (2016-01-28 23:28:08 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1618193003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1618193003/220001
4 years, 10 months ago (2016-01-28 23:29:53 UTC) #38
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 10 months ago (2016-01-29 00:37:38 UTC) #40
commit-bot: I haz the power
4 years, 10 months ago (2016-01-29 00:39:11 UTC) #42
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/0d5f977b77bc8d3c9f9dd78724fe7eecd6066e73
Cr-Commit-Position: refs/heads/master@{#372222}

Powered by Google App Engine
This is Rietveld 408576698