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

Unified Diff: components/sync/syncable/directory.h

Issue 2287783002: Remove stl_util's STLValueDeleter. (Closed)
Patch Set: rebase Created 4 years, 4 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: components/sync/syncable/directory.h
diff --git a/components/sync/syncable/directory.h b/components/sync/syncable/directory.h
index 6100d00afaf39d23d712a92199c2b2e9e3351763..262c8a05b01a8cc511f87e39a34e76485495dbbe 100644
--- a/components/sync/syncable/directory.h
+++ b/components/sync/syncable/directory.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <deque>
+#include <memory>
#include <set>
#include <string>
#include <unordered_map>
@@ -62,7 +63,8 @@ class Directory {
public:
typedef std::vector<int64_t> Metahandles;
- typedef std::unordered_map<int64_t, EntryKernel*> MetahandlesMap;
+ typedef std::unordered_map<int64_t, std::unique_ptr<EntryKernel>>
+ MetahandlesMap;
typedef std::unordered_map<std::string, EntryKernel*> IdsMap;
typedef std::unordered_map<std::string, EntryKernel*> TagsMap;
typedef std::string AttachmentIdUniqueId;
@@ -169,9 +171,9 @@ class Directory {
mutable base::Lock mutex;
// Entries indexed by metahandle. This container is considered to be the
- // owner of all EntryKernels, which may be referened by the other
+ // owner of all EntryKernels, which may be referenced by the other
// containers. If you remove an EntryKernel from this map, you probably
- // want to remove it from all other containers and delete it, too.
+ // want to remove it from all other containers.
MetahandlesMap metahandles_map;
// Entries indexed by id
« no previous file with comments | « components/sync/engine_impl/get_updates_processor_unittest.cc ('k') | components/sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698