[NTP Snippets] Revert RemoteSuggestionsFetcher usage of IdentityManager
This CL reverts the following two CLs: - "[NTP Snippets] RemoteSuggestionsFetcherImpl test uses IdentityTestEnv" (fce90bed) - "[NTP Snippets] Have RemoteSuggestionsFetcherImpl use IdentityManager" (683639a4) The reason is that the production change caused a regression in NTP Snippets: on signout, an unauthenticated fetch of snippets is no longer performed. The underlying cause is that IdentityManager being notified of signout (and changing its internal state) currently races with NTP Snippets itself being notified of signout (and starting its flow to refetch snippets). This is a straight revert with three minor exceptions: - There was a minor amount of conflict resolution to do due to intervening changes of base::MakeUnique to std::make_unique - The //services/identity API additions in fce90bed were *not* reverted as they are used by code that has subsequently landed in the tree. - Similarly, the //components/ntp_snippets/BUILD.gn changes were not reverted as those dependencies are now used on trunk even without these changes. This CL itself should be able to be reverted once I have fixed the above race by ensuring that IdentityManager is notified of signin/signout events before any observers of SigninManager. Note that in the long term this won't be a problem as there will be no external observers of SigninManager. To test this change, do the following: - Sign in to Chrome on Android (in a chrome_apk build if building locally) - Observe that there are personalized suggestions on the NTP - Sign out - Observe that there are different, generic suggestions on the NTP TBR=gambard@chromium.org Bug: 804410 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I114c3c4805d855b646bb748d4e2c5c5e9a966c3b Reviewed-on: https://chromium-review.googlesource.com/883321 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by:Gauthier Ambard <gambard@chromium.org> Reviewed-by:
Jan Krcal <jkrcal@chromium.org> Cr-Commit-Position: refs/heads/master@{#531511}
Showing
Please register or sign in to comment