Index: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp |
diff --git a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp |
index 971224d393d4160be420ac58ac85cf3a3b5d995d..e8c7fbcf8f6907f6642bd081ed23fdc71db53e4a 100644 |
--- a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp |
+++ b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp |
@@ -30,9 +30,6 @@ |
#include "platform/testing/TestingPlatformSupport.h" |
-#include "wtf/PtrUtil.h" |
-#include <memory> |
- |
namespace blink { |
TestingPlatformSupport::TestingPlatformSupport() |
@@ -71,12 +68,12 @@ WebThread* TestingPlatformSupport::currentThread() |
class TestingPlatformMockWebTaskRunner : public WebTaskRunner { |
WTF_MAKE_NONCOPYABLE(TestingPlatformMockWebTaskRunner); |
public: |
- explicit TestingPlatformMockWebTaskRunner(Deque<std::unique_ptr<WebTaskRunner::Task>>* tasks) : m_tasks(tasks) { } |
+ explicit TestingPlatformMockWebTaskRunner(Deque<OwnPtr<WebTaskRunner::Task>>* tasks) : m_tasks(tasks) { } |
~TestingPlatformMockWebTaskRunner() override { } |
void postTask(const WebTraceLocation&, Task* task) override |
{ |
- m_tasks->append(wrapUnique(task)); |
+ m_tasks->append(adoptPtr(task)); |
} |
void postDelayedTask(const WebTraceLocation&, Task*, double delayMs) override |
@@ -102,13 +99,13 @@ public: |
} |
private: |
- Deque<std::unique_ptr<WebTaskRunner::Task>>* m_tasks; // NOT OWNED |
+ Deque<OwnPtr<WebTaskRunner::Task>>* m_tasks; // NOT OWNED |
}; |
// TestingPlatformMockScheduler definition: |
TestingPlatformMockScheduler::TestingPlatformMockScheduler() |
- : m_mockWebTaskRunner(wrapUnique(new TestingPlatformMockWebTaskRunner(&m_tasks))) { } |
+ : m_mockWebTaskRunner(adoptPtr(new TestingPlatformMockWebTaskRunner(&m_tasks))) { } |
TestingPlatformMockScheduler::~TestingPlatformMockScheduler() { } |
@@ -138,7 +135,7 @@ void TestingPlatformMockScheduler::runAllTasks() |
class TestingPlatformMockWebThread : public WebThread { |
WTF_MAKE_NONCOPYABLE(TestingPlatformMockWebThread); |
public: |
- TestingPlatformMockWebThread() : m_mockWebScheduler(wrapUnique(new TestingPlatformMockScheduler)) { } |
+ TestingPlatformMockWebThread() : m_mockWebScheduler(adoptPtr(new TestingPlatformMockScheduler)) { } |
~TestingPlatformMockWebThread() override { } |
WebTaskRunner* getWebTaskRunner() override |
@@ -163,17 +160,17 @@ public: |
} |
private: |
- std::unique_ptr<TestingPlatformMockScheduler> m_mockWebScheduler; |
+ OwnPtr<TestingPlatformMockScheduler> m_mockWebScheduler; |
}; |
// TestingPlatformSupportWithMockScheduler definition: |
TestingPlatformSupportWithMockScheduler::TestingPlatformSupportWithMockScheduler() |
- : m_mockWebThread(wrapUnique(new TestingPlatformMockWebThread())) { } |
+ : m_mockWebThread(adoptPtr(new TestingPlatformMockWebThread())) { } |
TestingPlatformSupportWithMockScheduler::TestingPlatformSupportWithMockScheduler(const Config& config) |
: TestingPlatformSupport(config) |
- , m_mockWebThread(wrapUnique(new TestingPlatformMockWebThread())) { } |
+ , m_mockWebThread(adoptPtr(new TestingPlatformMockWebThread())) { } |
TestingPlatformSupportWithMockScheduler::~TestingPlatformSupportWithMockScheduler() { } |