Add profile supplier param to IdentityDiscController constructor.
This CL adds |mProfileSupplier| local variable that is observed for profile changes. |mProfileSupplier| is used to pass profile param to IdentityServicesProvider. By this CL; - |mProfileSupplier| notifies the class when the current profile is changed. - When current profile changes, setProfile function is triggered and mIdentityManager is updated with the new profile. - Introducing |getSyncAccountInfo| function that uses current profile (i.e., off-the-record or regular) and returns account information. This function returns null for OTR profiles. - Passing current profile to tracker instead of using always regular profile to fix unsafe usage of profile. - Adding |testIdentityDiscWithSwitchToIncognito| to test identity disc disappear when switching to incognito NTP from sign-in state. Bug: 1041781, 1075562, 1048632 Change-Id: Icd443c03033b5a20c1ba0b680f57c05dfc21222d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2307253 Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org> Reviewed-by:Boris Sazonov <bsazonov@chromium.org> Reviewed-by:
Ramin Halavati <rhalavati@chromium.org> Reviewed-by:
Pavel Yatsuk <pavely@chromium.org> Cr-Commit-Position: refs/heads/master@{#803158}
Showing
Please register or sign in to comment