New issue
Advanced search Search tips

Issue 913895 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 20
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 883318
issue 883330



Sign in to add a comment

Convert signin_browser_state_info_updater to use IdentityManager

Project Member Reported by blundell@chromium.org, Dec 11

Issue description

This 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.
 
David, could you just answer the question about the delegate from the OP? Then feel free to mark as available again. Thanks!
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.
Owner: blundell@chromium.org
Assigning back to Colin, let me know if we should make that change.
Labels: Proj-Servicification-VendorBug
Status: Available (was: Assigned)
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.
Project Member

Comment 6 by bugdroid1@chromium.org, 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

Blocking: 883330
Owner: ----
Summary: Convert signin_browser_state_info_updater to use IdentityManager (was: Convert signin_browser_state_info_updater_unittest.mm to use IdentityTestEnvironment)
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.
As part of this work, the factory should naturally lose its dependencies as well.

Comment 9 by hferre...@igalia.com, Jan 16 (6 days ago)

Owner: hferre...@igalia.com
Status: Started (was: Available)
Project Member

Comment 10 by bugdroid1@chromium.org, 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

Comment 11 by hferre...@igalia.com, 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.

Comment 12 by blundell@chromium.org, 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!

Comment 13 by hferre...@igalia.com, Jan 20 (3 days ago)

Status: Fixed (was: Started)
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