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

Unified Diff: third_party/WebKit/Source/platform/testing/RunAllTests.cpp

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/testing/RunAllTests.cpp
diff --git a/third_party/WebKit/Source/platform/testing/RunAllTests.cpp b/third_party/WebKit/Source/platform/testing/RunAllTests.cpp
index 2cd4f24ef9ff9599d0e7e64fa9e23780253d9d57..b84caf218bef1d8137776b47276d88a7285dcfb3 100644
--- a/third_party/WebKit/Source/platform/testing/RunAllTests.cpp
+++ b/third_party/WebKit/Source/platform/testing/RunAllTests.cpp
@@ -40,6 +40,7 @@
#include "public/platform/Platform.h"
#include "wtf/CryptographicallyRandomNumber.h"
#include "wtf/CurrentTime.h"
+#include "wtf/PtrUtil.h"
#include "wtf/WTF.h"
#include "wtf/allocator/Partitions.h"
#include <base/bind.h>
@@ -49,6 +50,7 @@
#include <base/test/launcher/unit_test_launcher.h>
#include <base/test/test_suite.h>
#include <cc/blink/web_compositor_support_impl.h>
+#include <memory>
namespace {
@@ -80,7 +82,7 @@ int main(int argc, char** argv)
base::StatisticsRecorder::Initialize();
- OwnPtr<DummyPlatform> platform = adoptPtr(new DummyPlatform);
+ std::unique_ptr<DummyPlatform> platform = wrapUnique(new DummyPlatform);
blink::Platform::setCurrentPlatformForTesting(platform.get());
WTF::Partitions::initialize(nullptr);
@@ -103,7 +105,7 @@ int main(int argc, char** argv)
mojo::edk::Init();
base::TestIOThread testIoThread(base::TestIOThread::kAutoStart);
- WTF::OwnPtr<mojo::edk::test::ScopedIPCSupport> ipcSupport(adoptPtr(new mojo::edk::test::ScopedIPCSupport(testIoThread.task_runner())));
+ std::unique_ptr<mojo::edk::test::ScopedIPCSupport> ipcSupport(wrapUnique(new mojo::edk::test::ScopedIPCSupport(testIoThread.task_runner())));
result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base::Unretained(&testSuite)));
blink::ThreadState::detachMainThread();

Powered by Google App Engine
This is Rietveld 408576698