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

Unified Diff: third_party/WebKit/Source/platform/TimerTest.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/TimerTest.cpp
diff --git a/third_party/WebKit/Source/platform/TimerTest.cpp b/third_party/WebKit/Source/platform/TimerTest.cpp
index dec685062c1e1cf09f5bd020d3bebf5b2e802fb2..22a5a8a1ff71ec3c7014b09c9878c712917cd1e3 100644
--- a/third_party/WebKit/Source/platform/TimerTest.cpp
+++ b/third_party/WebKit/Source/platform/TimerTest.cpp
@@ -11,9 +11,7 @@
#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;
@@ -22,10 +20,10 @@ namespace blink {
namespace {
double gCurrentTimeSecs = 0.0;
-// This class exists because gcc doesn't know how to move an std::unique_ptr.
+// This class exists because gcc doesn't know how to move an OwnPtr.
class RefCountedTaskContainer : public RefCounted<RefCountedTaskContainer> {
public:
- explicit RefCountedTaskContainer(WebTaskRunner::Task* task) : m_task(wrapUnique(task)) { }
+ explicit RefCountedTaskContainer(WebTaskRunner::Task* task) : m_task(adoptPtr(task)) { }
~RefCountedTaskContainer() { }
@@ -35,7 +33,7 @@ public:
}
private:
- std::unique_ptr<WebTaskRunner::Task> m_task;
+ OwnPtr<WebTaskRunner::Task> m_task;
};
class DelayedTask {
@@ -202,7 +200,7 @@ private:
class FakeWebThread : public WebThread {
public:
- FakeWebThread() : m_webScheduler(wrapUnique(new MockWebScheduler())) { }
+ FakeWebThread() : m_webScheduler(adoptPtr(new MockWebScheduler())) { }
~FakeWebThread() override { }
virtual bool isCurrentThread() const
@@ -239,13 +237,13 @@ public:
}
private:
- std::unique_ptr<MockWebScheduler> m_webScheduler;
+ OwnPtr<MockWebScheduler> m_webScheduler;
};
class TimerTestPlatform : public TestingPlatformSupport {
public:
TimerTestPlatform()
- : m_webThread(wrapUnique(new FakeWebThread())) { }
+ : m_webThread(adoptPtr(new FakeWebThread())) { }
~TimerTestPlatform() override { }
WebThread* currentThread() override
@@ -284,7 +282,7 @@ private:
return static_cast<MockWebScheduler*>(m_webThread->scheduler());
}
- std::unique_ptr<FakeWebThread> m_webThread;
+ OwnPtr<FakeWebThread> m_webThread;
};
class TimerTest : public testing::Test {
« no previous file with comments | « third_party/WebKit/Source/platform/SharedBufferTest.cpp ('k') | third_party/WebKit/Source/platform/TraceEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698