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

Unified Diff: sync/engine/non_blocking_type_commit_contribution.cc

Issue 1933803002: [Sync] USS: Ignore encryption changes during conflict resolution 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/non_blocking_type_commit_contribution.h ('k') | sync/engine/worker_entity_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/non_blocking_type_commit_contribution.cc
diff --git a/sync/engine/non_blocking_type_commit_contribution.cc b/sync/engine/non_blocking_type_commit_contribution.cc
index d4506b33e3b5dfc8829184eeed45f22d1dc27388..5e845c8eefaad20ac74d230dc443fef628b74859 100644
--- a/sync/engine/non_blocking_type_commit_contribution.cc
+++ b/sync/engine/non_blocking_type_commit_contribution.cc
@@ -19,12 +19,10 @@ namespace syncer_v2 {
NonBlockingTypeCommitContribution::NonBlockingTypeCommitContribution(
const sync_pb::DataTypeContext& context,
const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities,
- const std::vector<int64_t>& sequence_numbers,
ModelTypeWorker* worker)
: worker_(worker),
context_(context),
entities_(entities),
- sequence_numbers_(sequence_numbers),
cleaned_up_(false) {}
NonBlockingTypeCommitContribution::~NonBlockingTypeCommitContribution() {
@@ -54,7 +52,7 @@ syncer::SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse(
CommitResponseDataList response_list;
- for (size_t i = 0; i < sequence_numbers_.size(); ++i) {
+ for (int i = 0; i < entities_.size(); ++i) {
const sync_pb::CommitResponse_EntryResponse& entry_response =
commit_response.entryresponse(entries_start_index_ + i);
@@ -76,7 +74,6 @@ syncer::SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse(
response_data.id = entry_response.id_string();
response_data.client_tag_hash =
entities_.Get(i).client_defined_unique_tag();
- response_data.sequence_number = sequence_numbers_[i];
response_data.response_version = entry_response.version();
response_list.push_back(response_data);
break;
@@ -95,7 +92,7 @@ syncer::SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse(
// Send whatever successful responses we did get back to our parent.
// It's the schedulers job to handle the failures.
- worker_->OnCommitResponse(response_list);
+ worker_->OnCommitResponse(&response_list);
// Let the scheduler know about the failures.
if (unknown_error) {
@@ -118,7 +115,7 @@ void NonBlockingTypeCommitContribution::CleanUp() {
}
size_t NonBlockingTypeCommitContribution::GetNumEntries() const {
- return sequence_numbers_.size();
+ return entities_.size();
}
} // namespace syncer_v2
« no previous file with comments | « sync/engine/non_blocking_type_commit_contribution.h ('k') | sync/engine/worker_entity_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698