| Index: third_party/WebKit/Source/platform/TimerTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/TimerTest.cpp b/third_party/WebKit/Source/platform/TimerTest.cpp
|
| index 22a5a8a1ff71ec3c7014b09c9878c712917cd1e3..dec685062c1e1cf09f5bd020d3bebf5b2e802fb2 100644
|
| --- a/third_party/WebKit/Source/platform/TimerTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/TimerTest.cpp
|
| @@ -11,7 +11,9 @@
|
| #include "public/platform/WebViewScheduler.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| +#include "wtf/PtrUtil.h"
|
| #include "wtf/RefCounted.h"
|
| +#include <memory>
|
| #include <queue>
|
|
|
| using testing::ElementsAre;
|
| @@ -20,10 +22,10 @@ namespace blink {
|
| namespace {
|
| double gCurrentTimeSecs = 0.0;
|
|
|
| -// This class exists because gcc doesn't know how to move an OwnPtr.
|
| +// This class exists because gcc doesn't know how to move an std::unique_ptr.
|
| class RefCountedTaskContainer : public RefCounted<RefCountedTaskContainer> {
|
| public:
|
| - explicit RefCountedTaskContainer(WebTaskRunner::Task* task) : m_task(adoptPtr(task)) { }
|
| + explicit RefCountedTaskContainer(WebTaskRunner::Task* task) : m_task(wrapUnique(task)) { }
|
|
|
| ~RefCountedTaskContainer() { }
|
|
|
| @@ -33,7 +35,7 @@ public:
|
| }
|
|
|
| private:
|
| - OwnPtr<WebTaskRunner::Task> m_task;
|
| + std::unique_ptr<WebTaskRunner::Task> m_task;
|
| };
|
|
|
| class DelayedTask {
|
| @@ -200,7 +202,7 @@ private:
|
|
|
| class FakeWebThread : public WebThread {
|
| public:
|
| - FakeWebThread() : m_webScheduler(adoptPtr(new MockWebScheduler())) { }
|
| + FakeWebThread() : m_webScheduler(wrapUnique(new MockWebScheduler())) { }
|
| ~FakeWebThread() override { }
|
|
|
| virtual bool isCurrentThread() const
|
| @@ -237,13 +239,13 @@ public:
|
| }
|
|
|
| private:
|
| - OwnPtr<MockWebScheduler> m_webScheduler;
|
| + std::unique_ptr<MockWebScheduler> m_webScheduler;
|
| };
|
|
|
| class TimerTestPlatform : public TestingPlatformSupport {
|
| public:
|
| TimerTestPlatform()
|
| - : m_webThread(adoptPtr(new FakeWebThread())) { }
|
| + : m_webThread(wrapUnique(new FakeWebThread())) { }
|
| ~TimerTestPlatform() override { }
|
|
|
| WebThread* currentThread() override
|
| @@ -282,7 +284,7 @@ private:
|
| return static_cast<MockWebScheduler*>(m_webThread->scheduler());
|
| }
|
|
|
| - OwnPtr<FakeWebThread> m_webThread;
|
| + std::unique_ptr<FakeWebThread> m_webThread;
|
| };
|
|
|
| class TimerTest : public testing::Test {
|
|
|