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

Unified Diff: content/test/test_blink_web_unit_test_support.cc

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 8 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: content/test/test_blink_web_unit_test_support.cc
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc
index 50349664235ffdc85142758a54fe5e39cf43dedc..f7d305d35bb5a818cc8bfec6446f974bfbdee492 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -31,6 +31,7 @@
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebNetworkStateNotifier.h"
#include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
+#include "third_party/WebKit/public/platform/WebRTCCertificateGenerator.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebThread.h"
#include "third_party/WebKit/public/platform/WebURL.h"
@@ -51,7 +52,6 @@
#if BUILDFLAG(ENABLE_WEBRTC)
#include "content/renderer/media/rtc_certificate.h"
-#include "third_party/WebKit/public/platform/WebRTCCertificateGenerator.h"
#include "third_party/webrtc/base/rtccertificate.h" // nogncheck
#endif
@@ -268,12 +268,12 @@ blink::WebCompositorSupport* TestBlinkWebUnitTestSupport::CompositorSupport() {
return &compositor_support_;
}
-blink::WebGestureCurve* TestBlinkWebUnitTestSupport::CreateFlingAnimationCurve(
+std::unique_ptr<blink::WebGestureCurve>
+TestBlinkWebUnitTestSupport::CreateFlingAnimationCurve(
blink::WebGestureDevice device_source,
const blink::WebFloatPoint& velocity,
const blink::WebSize& cumulative_scroll) {
- // Caller will retain and release.
- return new WebGestureCurveMock(velocity, cumulative_scroll);
+ return base::MakeUnique<WebGestureCurveMock>(velocity, cumulative_scroll);
}
blink::WebURLLoaderMockFactory*
@@ -329,10 +329,10 @@ class TestWebRTCCertificateGenerator
} // namespace
#endif // BUILDFLAG(ENABLE_WEBRTC)
-blink::WebRTCCertificateGenerator*
+std::unique_ptr<blink::WebRTCCertificateGenerator>
TestBlinkWebUnitTestSupport::CreateRTCCertificateGenerator() {
#if BUILDFLAG(ENABLE_WEBRTC)
- return new TestWebRTCCertificateGenerator();
+ return base::MakeUnique<TestWebRTCCertificateGenerator>();
#else
return nullptr;
#endif
« no previous file with comments | « content/test/test_blink_web_unit_test_support.h ('k') | third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698