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

Unified Diff: sync/engine/model_type_sync_proxy_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: 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 | « sync/engine/entity_tracker.cc ('k') | sync/engine/model_type_sync_proxy_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/model_type_sync_proxy_impl.h
diff --git a/sync/engine/model_type_sync_proxy_impl.h b/sync/engine/model_type_sync_proxy_impl.h
index f160669f19faddf067dd757797d95d5c3b6a45c7..7faaa4cc2f939d6582a216273404d7f9be8be49c 100644
--- a/sync/engine/model_type_sync_proxy_impl.h
+++ b/sync/engine/model_type_sync_proxy_impl.h
@@ -5,8 +5,9 @@
#ifndef SYNC_ENGINE_MODEL_TYPE_SYNC_PROXY_IMPL_H_
#define SYNC_ENGINE_MODEL_TYPE_SYNC_PROXY_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/internal_api/public/base/model_type.h"
@@ -89,8 +90,10 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
base::WeakPtr<ModelTypeSyncProxyImpl> AsWeakPtrForUI();
private:
- typedef std::map<std::string, ModelTypeEntity*> EntityMap;
- typedef std::map<std::string, UpdateResponseData*> UpdateMap;
+ typedef base::ScopedPtrMap<std::string, scoped_ptr<ModelTypeEntity>>
+ EntityMap;
+ typedef base::ScopedPtrMap<std::string, scoped_ptr<UpdateResponseData>>
+ UpdateMap;
// Sends all commit requests that are due to be sent to the sync thread.
void FlushPendingCommitRequests();
@@ -131,13 +134,11 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
// The set of sync entities known to this object.
EntityMap entities_;
- STLValueDeleter<EntityMap> entities_deleter_;
// A set of updates that can not be applied at this time. These are never
// used by the model. They are kept here only so we can save and restore
// them across restarts, and keep them in sync with our progress markers.
UpdateMap pending_updates_map_;
- STLValueDeleter<UpdateMap> pending_updates_map_deleter_;
// We use two different WeakPtrFactories because we want the pointers they
// issue to have different lifetimes. When asked to disconnect from the sync
« no previous file with comments | « sync/engine/entity_tracker.cc ('k') | sync/engine/model_type_sync_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698