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

Unified Diff: ppapi/shared_impl/resource_tracker.h

Issue 1864293002: Convert //ppapi to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: ppapi/shared_impl/resource_tracker.h
diff --git a/ppapi/shared_impl/resource_tracker.h b/ppapi/shared_impl/resource_tracker.h
index 8e4ac080fe509a2ba838a3dce97f0932bae51530..38a7a8351463c2725c856a39708e33a5314602be 100644
--- a/ppapi/shared_impl/resource_tracker.h
+++ b/ppapi/shared_impl/resource_tracker.h
@@ -7,11 +7,11 @@
#include <stdint.h>
+#include <memory>
#include <set>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "base/threading/thread_checker_impl.h"
@@ -106,7 +106,8 @@ class PPAPI_SHARED_EXPORT ResourceTracker {
// going away (otherwise, they may crash if they outlive the instance).
ResourceSet resources;
};
- typedef base::hash_map<PP_Instance, scoped_ptr<InstanceData>> InstanceMap;
+ typedef base::hash_map<PP_Instance, std::unique_ptr<InstanceData>>
+ InstanceMap;
InstanceMap instance_map_;
@@ -128,7 +129,7 @@ class PPAPI_SHARED_EXPORT ResourceTracker {
// thread. This is to protect us from accidentally using the tracker from
// other threads (especially the IO thread). On the plugin side, the tracker
// is protected by the proxy lock and is thread-safe, so this will be NULL.
- scoped_ptr<base::ThreadChecker> thread_checker_;
+ std::unique_ptr<base::ThreadChecker> thread_checker_;
base::WeakPtrFactory<ResourceTracker> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698