diff options
-rw-r--r-- | sync/engine/commit.h | 9 | ||||
-rw-r--r-- | sync/engine/commit_processor.cc | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sync/engine/commit.h b/sync/engine/commit.h index d1ea552..871229f6 100644 --- a/sync/engine/commit.h +++ b/sync/engine/commit.h @@ -5,7 +5,9 @@ #ifndef SYNC_ENGINE_COMMIT_H_ #define SYNC_ENGINE_COMMIT_H_ -#include "base/containers/scoped_ptr_map.h" +#include <map> + +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "sync/base/sync_export.h" #include "sync/engine/commit_contribution.h" @@ -36,8 +38,7 @@ class Syncer; // PostAndProcessCommitResponse() functions. So they ended up here. class SYNC_EXPORT_PRIVATE Commit { public: - typedef base::ScopedPtrMap<ModelType, scoped_ptr<CommitContribution>> - ContributionMap; + typedef std::map<ModelType, scoped_ptr<CommitContribution>> ContributionMap; Commit(ContributionMap contributions, const sync_pb::ClientToServerMessage& message, @@ -73,6 +74,8 @@ class SYNC_EXPORT_PRIVATE Commit { // Debug only flag used to indicate if it's safe to destruct the object. bool cleaned_up_; + + DISALLOW_COPY_AND_ASSIGN(Commit); }; } // namespace syncer diff --git a/sync/engine/commit_processor.cc b/sync/engine/commit_processor.cc index a5149ac..4624fa4 100644 --- a/sync/engine/commit_processor.cc +++ b/sync/engine/commit_processor.cc @@ -4,7 +4,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 +39,7 @@ void CommitProcessor::GatherCommitContributions( cm_it->second->GetContribution(spaces_remaining); if (contribution) { num_entries += contribution->GetNumEntries(); - contributions->insert(it.Get(), contribution.Pass()); + contributions->insert(std::make_pair(it.Get(), std::move(contribution))); } if (num_entries >= max_entries) { DCHECK_EQ(num_entries, max_entries) |