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

Unified Diff: components/invalidation/impl/registration_manager.h

Issue 2465733002: Remove stl_util's deletion function use from components/invalidation/. (Closed)
Patch Set: Created 4 years, 2 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/invalidation/impl/registration_manager.h
diff --git a/components/invalidation/impl/registration_manager.h b/components/invalidation/impl/registration_manager.h
index 23fc9a6db380a6c1f77aecd7088a03d22a69c184..d608bd8c142a56ed17970fcf48cc59d9e6b76138 100644
--- a/components/invalidation/impl/registration_manager.h
+++ b/components/invalidation/impl/registration_manager.h
@@ -9,6 +9,7 @@
#define COMPONENTS_INVALIDATION_IMPL_REGISTRATION_MANAGER_H_
#include <map>
+#include <memory>
#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
@@ -147,10 +148,6 @@ class INVALIDATION_EXPORT RegistrationManager : public base::NonThreadSafe {
DISALLOW_COPY_AND_ASSIGN(RegistrationStatus);
};
- typedef std::map<invalidation::ObjectId,
- RegistrationStatus*,
- ObjectIdLessThan>
- RegistrationStatusMap;
// Does nothing if the given id is disabled. Otherwise, if
// |is_retry| is not set, registers the given type immediately and
@@ -175,7 +172,10 @@ class INVALIDATION_EXPORT RegistrationManager : public base::NonThreadSafe {
// Returns true iff the given object ID is registered.
bool IsIdRegistered(const invalidation::ObjectId& id) const;
- RegistrationStatusMap registration_statuses_;
+ std::map<invalidation::ObjectId,
+ std::unique_ptr<RegistrationStatus>,
+ ObjectIdLessThan>
+ registration_statuses_;
// Weak pointer.
invalidation::InvalidationClient* invalidation_client_;

Powered by Google App Engine
This is Rietveld 408576698