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

Unified Diff: third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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: third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
diff --git a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
index 18741b1f1b36e5e24fd5fee3328a93fefb205072..c6684da5ea27af4da590e0143ccf118530b9b2d8 100644
--- a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
+++ b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
@@ -11,9 +11,9 @@
#include "wtf/Allocator.h"
#include "wtf/Functional.h"
#include "wtf/Noncopyable.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/WeakPtr.h"
+#include <memory>
#include <type_traits>
namespace blink {
@@ -37,15 +37,15 @@ public:
// variety, which will refer back to the owner heap object safely (but weakly.)
//
template<typename T>
- static PassOwnPtr<CancellableTaskFactory> create(T* thisObject, void (T::*method)(), typename std::enable_if<IsGarbageCollectedType<T>::value>::type* = nullptr)
+ static std::unique_ptr<CancellableTaskFactory> create(T* thisObject, void (T::*method)(), typename std::enable_if<IsGarbageCollectedType<T>::value>::type* = nullptr)
{
- return adoptPtr(new CancellableTaskFactory(WTF::bind(method, CrossThreadWeakPersistentThisPointer<T>(thisObject))));
+ return wrapUnique(new CancellableTaskFactory(WTF::bind(method, CrossThreadWeakPersistentThisPointer<T>(thisObject))));
}
template<typename T>
- static PassOwnPtr<CancellableTaskFactory> create(T* thisObject, void (T::*method)(), typename std::enable_if<!IsGarbageCollectedType<T>::value>::type* = nullptr)
+ static std::unique_ptr<CancellableTaskFactory> create(T* thisObject, void (T::*method)(), typename std::enable_if<!IsGarbageCollectedType<T>::value>::type* = nullptr)
{
- return adoptPtr(new CancellableTaskFactory(WTF::bind(method, thisObject)));
+ return wrapUnique(new CancellableTaskFactory(WTF::bind(method, thisObject)));
}
bool isPending() const

Powered by Google App Engine
This is Rietveld 408576698