Migrate IdentitySigninFlow to listen for authenticated account being signed in via Identity Service |
||||
Issue descriptionIdentitySigninFlow currently observes ProfileOAuth2TokenService to get notified when a refresh token is available and then calls SigninManager to determine whether the corresponding account is the authenticated account. Instead it should observe the Identity Service. The callback that it receives from the Identity Service can contain the info of whether the account is the authenticated account or not.
,
Jun 19 2017
,
Jun 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d829d85d98e95d4453eba1c655c38d55bd82f37a commit d829d85d98e95d4453eba1c655c38d55bd82f37a Author: Colin Blundell <blundell@chromium.org> Date: Fri Jun 30 11:06:06 2017 [Identity Service] Ensure IdentityManager doesn't outlive dependencies The IdentityManager depends on //components/signin classes but doesn't currently have any mechanism for ensuring that it dies before its dependencies do. This CL adds such a mechanism and uses it: - Adds ability to get notified on SigninManagerBase shutdown. - Changes IdentityManager to die either when its connection is broken (the current behavior) OR when its |signin_manager_| instance is shut down. The reason that we choose SigninManagerBase is that it is shut down first in the hierarchy of //components/signin keyed services. Bug: 729966 Change-Id: I546bedba09a08f3b1175a747bf11b999e6419b05 Reviewed-on: https://chromium-review.googlesource.com/557865 Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#483674} [modify] https://crrev.com/d829d85d98e95d4453eba1c655c38d55bd82f37a/components/signin/core/browser/signin_manager_base.cc [modify] https://crrev.com/d829d85d98e95d4453eba1c655c38d55bd82f37a/components/signin/core/browser/signin_manager_base.h [modify] https://crrev.com/d829d85d98e95d4453eba1c655c38d55bd82f37a/services/identity/identity_manager.cc [modify] https://crrev.com/d829d85d98e95d4453eba1c655c38d55bd82f37a/services/identity/identity_manager.h [modify] https://crrev.com/d829d85d98e95d4453eba1c655c38d55bd82f37a/services/identity/identity_manager_unittest.cc
,
Jul 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bdf4642db91687af930bd9c58dfee693350117fa commit bdf4642db91687af930bd9c58dfee693350117fa Author: Colin Blundell <blundell@chromium.org> Date: Thu Jul 06 07:00:03 2017 [Identity Service] Add notification on primary account availability This CL adds a method to the Identity Service that suuports notification on availability of the primary account (i.e., when the primary account is authenticated and has a refresh token). This method will return immediately if the primary account is available; otherwise it will call back the requestor when the primary account is available. The purpose of this method is to replace overrides of OAuth2TokenService::Observer::OnRefreshTokenAvailable() and SigninManagerBase::Observer::GoogleSigninSucceeded() that are just listening for the user to be signed in to the primary account in a one-shot fashion. This CL converts one such usage, that of the Identity extension API implementation. Bug: 729966 Test: Install a Chrome extension with the identity permissions in its manifest. Sign out of the browser. Go to chrome://extensions, enable developer mode, and inspect the background page of the above app. At the JS console that that brings up, execute: chrome.identity.getAuthToken({interactive: true}, (token) => {console.log(token);} ) This should bring up a signin page in the browser. Verify that a long alphanumeric string appears at the JS console once you have signed in to the browser. Change-Id: Id92de59ba9608820f7e06da734856a07614a9b64 Reviewed-on: https://chromium-review.googlesource.com/539637 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#484491} [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/chrome/browser/extensions/api/identity/identity_signin_flow.cc [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/chrome/browser/extensions/api/identity/identity_signin_flow.h [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/identity_manager.cc [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/identity_manager.h [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/identity_manager_unittest.cc [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/public/cpp/account_state.cc [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/public/cpp/account_state.h [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/public/cpp/account_state_struct_traits.cc [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/public/cpp/account_state_struct_traits.h [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/public/interfaces/account_state.mojom [modify] https://crrev.com/bdf4642db91687af930bd9c58dfee693350117fa/services/identity/public/interfaces/identity_manager.mojom
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/25a80825cea5e451bad38870912bf4807eddff56 commit 25a80825cea5e451bad38870912bf4807eddff56 Author: Colin Blundell <blundell@chromium.org> Date: Thu Jul 13 06:17:52 2017 [Identity Service] Stop serving requests after shutdown. Similarly to the IdentityManager shutting itself down when the SigninManager shuts down, the Identity Service should also stop serving any new requests at that point. Bug: 729966 Change-Id: Ica8ca374952f7f795ffa1cff5dd7906944466a39 Reviewed-on: https://chromium-review.googlesource.com/567919 Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#486289} [modify] https://crrev.com/25a80825cea5e451bad38870912bf4807eddff56/services/identity/identity_manager_unittest.cc [modify] https://crrev.com/25a80825cea5e451bad38870912bf4807eddff56/services/identity/identity_service.cc [modify] https://crrev.com/25a80825cea5e451bad38870912bf4807eddff56/services/identity/identity_service.h
,
Nov 1 2017
,
Nov 7 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by blundell@chromium.org
, Jun 6 2017