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

Unified Diff: content/test/test_blink_web_unit_test_support.cc

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix content_shell compilation 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..ff20a91ee457fdf318a487b7d0c1209ac6f2df45 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -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

Powered by Google App Engine
This is Rietveld 408576698