Print Preview: Simplify signin
Print Preview Handler was only observing the identity manager if mirror was enabled. However, mirror is now generally disabled, so Print Preview never actually received any notifications about cookie jar changes. This CL changes PrintPreviewHandler to always add this observer unless cloud print is disabled (in which case Print Preview does not need login information). With the observer, the callback after sign in completion is no longer necessary. If the user signs in to cloud print successfully, IdentityManager::Observer::OnAccountToCookieCompleted() will be called. The reload-printer-list event fired from this function triggers a call to onDestinationsReload(), which is the same call that happens after the sign in promise is resolved. The only expected behavior change from this CL is that if the destinations dialog is open when a user signs in or out in a different tab, the destinations should refresh. Bug: 932692, 958767 Change-Id: Ibdabf382f4eb8f6c438376b2f2415c27f4e9c586 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626933Reviewed-by:Lei Zhang <thestig@chromium.org> Reviewed-by:
Demetrios Papadopoulos <dpapad@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#663859}
Showing
Please register or sign in to comment