forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FCMInvalidationServiceBase: Consistently notify about the client ID
FCMInvalidationServiceBase has a client ID aka InstanceID, which is exposed to InvalidationHandlers via OnInvalidatorClientIdChange(). Before this CL, there was one sequence of events where handlers were *not* informed about the client ID: 1) Handler registers itself (RegisterInvalidationHandler). 2) FCMInvalidationServiceBase gets initialized and restores the client ID from prefs, but does *not* notify handlers. <- This is the bug! 3) FCMInvalidationServiceBase receives a fresh (validated) client ID in OnInstanceIDReceived(), but it's (typically) identical to the previous, cached one, so it doesn't notify handlers. This CL adds a notification to handlers in step 2, after the client ID is read from prefs. It also adds a test about client ID notifications. Bug: 1203521 Change-Id: I18d84a0ea46d52062485a05ebb9627fc4d3bae83 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2871607 Commit-Queue: Marc Treib <treib@chromium.org> Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com> Cr-Commit-Position: refs/heads/master@{#879010}
- Loading branch information
Marc Treib
authored and
Chromium LUCI CQ
committed
May 4, 2021
1 parent
2130241
commit 4f780e7
Showing
5 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters