New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624457 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 597756



Sign in to add a comment

[Blimp Client] v0.6 Client Authentication

Project Member Reported by dtrainor@chromium.org, Jun 29 2016

Issue description

Pull the correct authentication token for the Blimp v0.6 client.

This involves the following things:
- When Blimp is turned on (or when the application starts with Blimp enabled), pull the authentication token from an account signed into Chrome and give it to the BlimpClientSession (being reworked into BlimpClientContext and tied into Chrome for Android in parallel).  See TokenSourceImpl for how this is done in the Blimp v0.5 client.  There is similar code already in Chrome.  +nyquist@ for some advice on where this code is and how to access it.
- If no account is signed into Chrome, don't allow Blimp to be turned on and show a dialog directing the user to the sign in settings flow.
- If the account is deleted from Chrome's sync/sign in list, turn off Blimp automatically and show a dialog.

Note that this should all be bypassed if there is a custom engine ip/port specified in the command line.

Again this code should only run if built for the Blimp target.
 
Blocking: 597756
Cc: -nyquist@chromium.org xingliu@chromium.org
Owner: nyquist@chromium.org
It looks like tommy is doing this now.  Reassigning to him.  Feel free to adjust if necessary.
Cc: -xingliu@chromium.org nyquist@chromium.org
Owner: xingliu@chromium.org
Xing took it back this morning :-)
Labels: Blimp-M54-Proj-Scope
[Bulk edit]

Setting tracking label Blimp-M54-Proj-Scope.  This label is for scope tracking purposes only and should not be added / removed from any bugs, even if we add additional bugs to M-54 scope, or remove this bug from M-54 scope.
Status: Started (was: Assigned)
Token CL is in review, there will be a CL hooks the token with current setting UI.
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f748905541816e1fede06d2ad01b96075e727bc4

commit f748905541816e1fede06d2ad01b96075e727bc4
Author: xingliu <xingliu@chromium.org>
Date: Thu Aug 18 20:22:25 2016

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 

Review-Url: https://codereview.chromium.org/2204223005
Cr-Commit-Position: refs/heads/master@{#412923}

[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/DEPS
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/android/blimp_client_context_impl_android.cc
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/android/blimp_client_context_impl_android.h
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/android/java/src/org/chromium/blimp/core/DummyBlimpClientContext.java
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/blimp_client_context_impl.cc
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/blimp_client_context_impl.h
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/dummy_blimp_client_context.cc
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/dummy_blimp_client_context.h
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/session/BUILD.gn
[add] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/session/identity_source.cc
[add] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/session/identity_source.h
[add] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/core/session/identity_source_unittest.cc
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/public/android/java/src/org/chromium/blimp_public/BlimpClientContext.java
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/public/blimp_client_context.h
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/public/blimp_client_context_delegate.h
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/test/BUILD.gn
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/test/test_blimp_client_context_delegate.cc
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/blimp/client/test/test_blimp_client_context_delegate.h
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
[modify] https://crrev.com/f748905541816e1fede06d2ad01b96075e727bc4/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.h

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe

commit e8dee94d09ad68c28f72ee1acabcbaab0b071fbe
Author: xingliu <xingliu@chromium.org>
Date: Wed Aug 31 00:24:54 2016

Integrate UI with authentication flow.

1. Integrate connect call into Blimp settings UI.

2. Polish the connect functions in java and c++, now identity_source is
responsible for handling GoogleServiceAuthError::REQUEST_CANCELED, since
the Java approach(AccountTrackerService listener) didn't work with
non-startup connect attempts. And code structure is cleaner in this way.

3. Removed BlimpSettingsCallback, and moved embedder functions into
BlimpClientContextDelegate. Also added testing classes for
BlimpClientContext and BlimpClientContextDelegate, but these classes can
only test shim Java layer.

4. Created BUILD.gn for core/settings, and put jni files there. Java
file is still in core/, for easier review diff. There will be future CL
to move these Java files.

5. Added BlimpClientContextInternal Java interface to decouple internal build
targets.

BUG= 624457 

Review-Url: https://codereview.chromium.org/2261273002
Cr-Commit-Position: refs/heads/master@{#415511}

[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/BUILD.gn
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/DEPS
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/app/android/AndroidManifest.xml.jinja2
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/app/android/java/strings/android_blimp_strings.grd
[add] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/app/android/javatests/src/org/chromium/blimp/core/MockBlimpClientContext.java
[add] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/app/android/javatests/src/org/chromium/blimp/core/MockBlimpClientContextDelegate.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/app/android/javatests/src/org/chromium/blimp/core/settings/BlimpPreferencesTest.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/app/android/javatests/src/org/chromium/blimp/core/settings/MockPreferences.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/BUILD.gn
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/blimp_client_context_impl_android.cc
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/blimp_client_context_impl_android.h
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/blimp_jni_registrar.cc
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/java/src/org/chromium/blimp/core/DummyBlimpClientContext.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/java/src/org/chromium/blimp/core/settings/AboutBlimpPreferences.java
[add] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/java/src/org/chromium/blimp/core/settings/BlimpPreferencesDelegate.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/android/java/src/org/chromium/blimp/core/settings/PreferencesUtil.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/blimp_client_context_impl.cc
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/blimp_client_context_impl.h
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/session/identity_source.cc
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/session/identity_source.h
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/session/identity_source_unittest.cc
[add] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/settings/BUILD.gn
[add] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/settings/android/blimp_settings_android.cc
[add] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/core/settings/android/blimp_settings_android.h
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/public/BUILD.gn
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/public/android/java/src/org/chromium/blimp_public/BlimpClientContext.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/blimp/client/public/android/java/src/org/chromium/blimp_public/BlimpClientContextDelegate.java
[delete] https://crrev.com/d1900650f2f08e845531db6b01c8aafc4365d4d8/blimp/client/public/android/java/src/org/chromium/blimp_public/BlimpSettingsCallbacks.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/build/android/lint/suppressions.xml
[delete] https://crrev.com/d1900650f2f08e845531db6b01c8aafc4365d4d8/chrome/android/java/src/org/chromium/chrome/browser/blimp/BlimpSettingsCallbacksImpl.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
[modify] https://crrev.com/e8dee94d09ad68c28f72ee1acabcbaab0b071fbe/chrome/android/java_sources.gni

Status: Fixed (was: Started)
Labels: Archive-Blimp

Sign in to add a comment