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

Unified Diff: sync/engine/commit.h

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Rebase. Created 5 years, 6 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 | « media/midi/midi_manager_alsa.cc ('k') | sync/engine/commit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/commit.h
diff --git a/sync/engine/commit.h b/sync/engine/commit.h
index ee81577944b3ffc5a2a79e8050a84d47f28dc5e7..d1ea5529dc177150b2b5c460a3e809597dded6dc 100644
--- a/sync/engine/commit.h
+++ b/sync/engine/commit.h
@@ -5,9 +5,8 @@
#ifndef SYNC_ENGINE_COMMIT_H_
#define SYNC_ENGINE_COMMIT_H_
-#include <map>
-
-#include "base/stl_util.h"
+#include "base/containers/scoped_ptr_map.h"
+#include "base/memory/scoped_ptr.h"
#include "sync/base/sync_export.h"
#include "sync/engine/commit_contribution.h"
#include "sync/internal_api/public/base/model_type.h"
@@ -37,11 +36,12 @@ class Syncer;
// PostAndProcessCommitResponse() functions. So they ended up here.
class SYNC_EXPORT_PRIVATE Commit {
public:
- Commit(
- const std::map<ModelType, CommitContribution*>&
- contributions,
- const sync_pb::ClientToServerMessage& message,
- ExtensionsActivity::Records extensions_activity_buffer);
+ typedef base::ScopedPtrMap<ModelType, scoped_ptr<CommitContribution>>
+ ContributionMap;
+
+ Commit(ContributionMap contributions,
+ const sync_pb::ClientToServerMessage& message,
+ ExtensionsActivity::Records extensions_activity_buffer);
// This destructor will DCHECK if CleanUp() has not been called.
~Commit();
@@ -65,10 +65,7 @@ class SYNC_EXPORT_PRIVATE Commit {
void CleanUp();
private:
- typedef std::map<ModelType, CommitContribution*> ContributionMap;
-
ContributionMap contributions_;
- STLValueDeleter<ContributionMap> deleter_;
sync_pb::ClientToServerMessage message_;
sync_pb::ClientToServerResponse response_;
« no previous file with comments | « media/midi/midi_manager_alsa.cc ('k') | sync/engine/commit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698