DescriptionFix GCMKeyStore interleaved request handling
Consider calling CreateKeys immediately followed by RemoveKeys for the
same app_id. Previously, the following would happen:
1. CreateKeys posts to database
2. RemoveKeys immediately succeeds, since the app_id is missing from key_pairs_
3. The database callback DidStoreKeys runs and writes app_id to key_pairs_
Hence the keys would end up existing (in both the key_pairs_ cache and the
database) even though RemoveKeys had been called second and claimed to succeed!
This patch fixes this class of issues, by making key_pairs_ the source of truth,
which is asynchronously replicated to the database.
BUG=589461
Committed: https://crrev.com/85aed8cb807e0a556cfdf5554943a065409b28f3
Cr-Commit-Position: refs/heads/master@{#391856}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Address review comments #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 12 (6 generated)
|