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

Unified Diff: sync/engine/model_type_sync_worker_impl.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: Fix Mac compile. 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
Index: sync/engine/model_type_sync_worker_impl.h
diff --git a/sync/engine/model_type_sync_worker_impl.h b/sync/engine/model_type_sync_worker_impl.h
index 30015697f3fe714dda83825834f762e09a501ecf..0d6f06aa53a269e7b815d6fcfa77d52d3ee054c5 100644
--- a/sync/engine/model_type_sync_worker_impl.h
+++ b/sync/engine/model_type_sync_worker_impl.h
@@ -5,8 +5,9 @@
#ifndef SYNC_ENGINE_MODEL_TYPE_SYNC_WORKER_IMPL_H_
#define SYNC_ENGINE_MODEL_TYPE_SYNC_WORKER_IMPL_H_
+#include "base/containers/scoped_ptr_map.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/stl_util.h"
#include "base/threading/non_thread_safe.h"
#include "sync/base/sync_export.h"
#include "sync/engine/commit_contributor.h"
@@ -90,8 +91,7 @@ class SYNC_EXPORT ModelTypeSyncWorkerImpl : public UpdateHandler,
base::WeakPtr<ModelTypeSyncWorkerImpl> AsWeakPtr();
private:
- typedef std::map<std::string, EntityTracker*> EntityMap;
- typedef std::map<std::string, UpdateResponseData*> UpdateMap;
+ typedef ScopedPtrMap<std::string, scoped_ptr<EntityTracker>> EntityMap;
// Stores a single commit request in this object's internal state.
void StorePendingCommit(const CommitRequestData& request);
@@ -160,7 +160,6 @@ class SYNC_EXPORT ModelTypeSyncWorkerImpl : public UpdateHandler,
// with the model thread, we could optimize this to reduce memory usage in
// the steady state.
EntityMap entities_;
- STLValueDeleter<EntityMap> entities_deleter_;
base::WeakPtrFactory<ModelTypeSyncWorkerImpl> weak_ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698