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

Issue 1915983003: [Sync] Fix crash in GCP when adding encrypted entry that already exists. (Closed)

Created:
4 years, 8 months ago by pavely
Modified:
4 years, 8 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, sync-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Fix crash in GCP when adding encrypted entry that already exists. When model type's syncable service adds entry, GenericChangeProcessor first looks up if entry with given client tag hash already exists. WriteNode::InitUniqueByCreationImpl looks up entry, but doesn't decrypt if it is found. BaseNode::GetEntitySpecifics() expects cached decrypted entry's specifics for encrytped entry which causes DCHECK. The fix is to call DecryptIfNecessary when existing entry is found in WriteNode::InitUniqueByCreationImpl. BUG=601257 R=zea@chromium.org Committed: https://crrev.com/194ec8ddbc3a77d4af0b7455cd9b85305a134e1e Cr-Commit-Position: refs/heads/master@{#389801}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Removed HandleDecryptError() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -48 lines) Patch
M components/sync_driver/generic_change_processor.cc View 1 2 chunks +19 lines, -48 lines 0 comments Download
M sync/internal_api/public/write_node.h View 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 chunk +33 lines, -0 lines 0 comments Download
M sync/internal_api/write_node.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
pavely
4 years, 8 months ago (2016-04-25 20:48:50 UTC) #1
Nicolas Zea
LGTM with two nits https://codereview.chromium.org/1915983003/diff/1/components/sync_driver/generic_change_processor.cc File components/sync_driver/generic_change_processor.cc (right): https://codereview.chromium.org/1915983003/diff/1/components/sync_driver/generic_change_processor.cc#newcode540 components/sync_driver/generic_change_processor.cc:540: case syncer::WriteNode::INIT_FAILED_DECRYPT_EXISTING_ENTRY: { nit: no ...
4 years, 8 months ago (2016-04-25 21:40:10 UTC) #2
pavely
https://codereview.chromium.org/1915983003/diff/1/components/sync_driver/generic_change_processor.cc File components/sync_driver/generic_change_processor.cc (right): https://codereview.chromium.org/1915983003/diff/1/components/sync_driver/generic_change_processor.cc#newcode632 components/sync_driver/generic_change_processor.cc:632: if (!agreement && !can_decrypt) { On 2016/04/25 21:40:10, Nicolas ...
4 years, 8 months ago (2016-04-26 00:33:25 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1915983003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1915983003/40001
4 years, 8 months ago (2016-04-26 16:22:51 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 8 months ago (2016-04-26 16:27:17 UTC) #8
commit-bot: I haz the power
4 years, 8 months ago (2016-04-26 16:29:01 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/194ec8ddbc3a77d4af0b7455cd9b85305a134e1e
Cr-Commit-Position: refs/heads/master@{#389801}

Powered by Google App Engine
This is Rietveld 408576698