Convert signin_browser_state_info_updater to use IdentityManager |
||||||
Issue descriptionThis code builds a FakePO2TS manually using a hand-constructed delegate. We'll need to know why just using a vanilla FakePO2TS (with the default delegate) isn't enough.
,
Dec 11
IIRC, what the test fundamentally wants to do is to signin and change the authentication errors. I tried BuildFakeOAuth2TokenService in fake_oauth2_token_service_builder.mm but it was not working for me. So I modified the code to use a fake provider instead and it worked. Maybe the vanilla FakePO2TS would work, I don't remember if I tried. I can try if that helps.
,
Dec 11
Ok, I tried and it probably works: https://chromium-review.googlesource.com/c/chromium/src/+/1371897
,
Dec 11
Assigning back to Colin, let me know if we should make that change.
,
Dec 12
Thanks, David! Note to anyone who wants to work on this bug: Wait until https://chromium-review.googlesource.com/c/chromium/src/+/1371897 lands before beginning work.
,
Dec 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/57a69b57310569a910f0e950b40e9f7ffe5eef51 commit 57a69b57310569a910f0e950b40e9f7ffe5eef51 Author: David Roger <droger@chromium.org> Date: Thu Dec 13 10:07:04 2018 [signin] Use vanilla FakeProfileOAuth2TokenService in BrowserStateInfoUpdater tests Bug: 913895 Change-Id: Ie371ec75dd7f4e843676cfc366a1a09ec4154c83 Reviewed-on: https://chromium-review.googlesource.com/c/1371897 Commit-Queue: David Roger <droger@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#616258} [modify] https://crrev.com/57a69b57310569a910f0e950b40e9f7ffe5eef51/ios/chrome/browser/signin/signin_browser_state_info_updater_unittest.mm
,
Jan 9
Generalizing this bug: - SigninBrowserStateInfoUpdater should be ported away from SigninManager (straightforward). - The unittest should be ported away from ProfileOAuth2TokenService/SigninManager/AccountTrackerService to use IdentityTestEnvironment via IdentityTestEnvironmentBrowserStateAdaptor.
,
Jan 9
As part of this work, the factory should naturally lose its dependencies as well.
,
Jan 16
(6 days ago)
,
Jan 18
(4 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/05f73c05e6a6ff45f9860306782d3236bec9c6da commit 05f73c05e6a6ff45f9860306782d3236bec9c6da Author: Henrique Ferreiro <hferreiro@igalia.com> Date: Fri Jan 18 09:20:09 2019 Convert SigninBrowserStateInfoUpdater to use IdentityManager Migrate the class from using SigninManager by using the corresponding callbacks from IdentityManager. Bug: 913895 Change-Id: I94b765ebfa804729ce3e54edffc555cc45b9ef05 Reviewed-on: https://chromium-review.googlesource.com/c/1415553 Reviewed-by: David Roger <droger@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com> Cr-Commit-Position: refs/heads/master@{#624047} [modify] https://crrev.com/05f73c05e6a6ff45f9860306782d3236bec9c6da/ios/chrome/browser/signin/signin_browser_state_info_updater.h [modify] https://crrev.com/05f73c05e6a6ff45f9860306782d3236bec9c6da/ios/chrome/browser/signin/signin_browser_state_info_updater.mm [modify] https://crrev.com/05f73c05e6a6ff45f9860306782d3236bec9c6da/ios/chrome/browser/signin/signin_browser_state_info_updater_factory.mm
,
Jan 18
(4 days ago)
Colin, what do you mean by saying that the factory should lose its dependencies? It seems to be that those are still needed.
,
Jan 18
(4 days ago)
Hi Henrique, You implemented what I had meant in your CL: the factory no longer needs to know about SigninManager, since the production class no longer needs to. Thanks!
,
Jan 20
(3 days ago)
Ok, understood. I got confused because the dependency is just changed to an IdentityManagerFactory, as happens in similar refactorings. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by blundell@chromium.org
, Dec 11