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

Unified Diff: sync/engine/commit_processor.cc

Issue 1490613002: (trybot test) base: Make ScopedPtrMap use DISALLOW_COPY_AND_ASSIGN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/commit.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/commit_processor.cc
diff --git a/sync/engine/commit_processor.cc b/sync/engine/commit_processor.cc
index a5149acdb4e258e7f9aa55e3534885674ee2b499..2dcf590332a81667a26b9e3b2178871029297dd5 100644
--- a/sync/engine/commit_processor.cc
+++ b/sync/engine/commit_processor.cc
@@ -5,6 +5,7 @@
#include "sync/engine/commit_processor.h"
#include <map>
+#include <utility>
#include "sync/engine/commit_contribution.h"
#include "sync/engine/commit_contributor.h"
@@ -39,7 +40,8 @@ void CommitProcessor::GatherCommitContributions(
cm_it->second->GetContribution(spaces_remaining);
if (contribution) {
num_entries += contribution->GetNumEntries();
- contributions->insert(it.Get(), contribution.Pass());
+ DCHECK(!contributions->count(it.Get()));
+ (*contributions)[it.Get()] = std::move(contribution);
Nico 2015/12/01 01:02:16 Should there be a comment here saying that this us
danakj 2015/12/01 01:03:12 Oh, or maybe we don't need to do this and can inse
vmpstr 2015/12/01 01:03:58 Oh this was just me applying the latest patchset,
}
if (num_entries >= max_entries) {
DCHECK_EQ(num_entries, max_entries)
« no previous file with comments | « sync/engine/commit.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698