Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Issue 1948133003: Fix GCMKeyStore interleaved request handling (Closed)

Created:
4 years, 7 months ago by johnme
Modified:
4 years, 7 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews, Peter Beverloo, johnme+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@iid5default
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -27 lines) Patch
M components/gcm_driver/crypto/gcm_key_store.h View 1 chunk +2 lines, -5 lines 0 comments Download
M components/gcm_driver/crypto/gcm_key_store.cc View 1 4 chunks +29 lines, -22 lines 0 comments Download
M components/gcm_driver/crypto/gcm_key_store_unittest.cc View 1 1 chunk +31 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 12 (6 generated)
johnme
4 years, 7 months ago (2016-05-05 15:20:44 UTC) #2
Peter Beverloo
lgtm, but please add a test for it The sentence in your CL description is ...
4 years, 7 months ago (2016-05-05 15:29:36 UTC) #3
johnme
Addressed review comments - thanks! > lgtm, but please add a test for it Done. ...
4 years, 7 months ago (2016-05-05 17:32:46 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1948133003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1948133003/20001
4 years, 7 months ago (2016-05-05 17:33:19 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-05 18:48:45 UTC) #10
commit-bot: I haz the power
4 years, 7 months ago (2016-05-05 18:50:05 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/85aed8cb807e0a556cfdf5554943a065409b28f3
Cr-Commit-Position: refs/heads/master@{#391856}

Powered by Google App Engine
This is Rietveld 408576698