Create AccountsMutator::MoveAccount() method to replace PO2TS::ExtractCredentials() |
|||
Issue descriptionPO2TS::ExtractCredentials() is used by dice_turn_on_sync_helper.cc. Hence, we need an equivalent on AccountsMutator. Let's call this MoveAccount().
,
Jan 16
(6 days ago)
Hi Antonio, Thanks! The challenge with that approach is that we don't expose anything like GetRefreshToken() (and don't want to I think), and we also don't expose publicly the ability to remove a refresh token without revoking the token on the server (and similarly I don't think that we want to).
,
Yesterday
(35 hours ago)
,
Today
(15 hours ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b9f5c2e50ce55433c7b160218de41924e1599802 commit b9f5c2e50ce55433c7b160218de41924e1599802 Author: Antonio Gomes <tonikitoo@igalia.com> Date: Tue Jan 22 15:09:32 2019 Implement AccountsMutator::MoveAccount() method to replace PO2TS::ExtractCredentials() This method implements the AccountsMutator::MoveAccount API as a wrapper to the existing PO2TS::ExtractCredentials API. Note that the implementation body also calls AccountTrackerService::SeedAccountInfo, saving the caller site to do so (an example of its usage can be seen in [1]). [1] https://crrev.com/c/1426457 BUG= 922482 Change-Id: I63ef547dab7813a8dec99ec071a65d461ab6912d Reviewed-on: https://chromium-review.googlesource.com/c/1425663 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Cr-Commit-Position: refs/heads/master@{#624780} [modify] https://crrev.com/b9f5c2e50ce55433c7b160218de41924e1599802/services/identity/public/cpp/BUILD.gn [modify] https://crrev.com/b9f5c2e50ce55433c7b160218de41924e1599802/services/identity/public/cpp/DEPS [modify] https://crrev.com/b9f5c2e50ce55433c7b160218de41924e1599802/services/identity/public/cpp/accounts_mutator.h [modify] https://crrev.com/b9f5c2e50ce55433c7b160218de41924e1599802/services/identity/public/cpp/accounts_mutator_impl.cc [modify] https://crrev.com/b9f5c2e50ce55433c7b160218de41924e1599802/services/identity/public/cpp/accounts_mutator_impl.h [modify] https://crrev.com/b9f5c2e50ce55433c7b160218de41924e1599802/services/identity/public/cpp/accounts_mutator_unittest.cc
,
Today
(14 hours ago)
|
|||
►
Sign in to add a comment |
|||
Comment 1 by toniki...@chromium.org
, Jan 16 (6 days ago)Status: Started (was: Available)
Thanks Colin. I have not filed that specific bug because I thought this API could be implemented locally by calling the two from its body separately (maybe having a local helper methor): void MutableProfileOAuth2TokenServiceDelegate::ExtractCredentials( OAuth2TokenService* to_service, const std::string& account_id) { static_cast<ProfileOAuth2TokenService*>(to_service) ->UpdateCredentials(account_id, GetRefreshToken(account_id), signin_metrics::SourceForRefreshTokenOperation:: kTokenService_ExtractCredentials); RevokeCredentialsImpl(account_id, /*revoke_on_server=*/false);