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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2850593002: Revert of [blink] Unique pointers in Platform.h (Closed)
Patch Set: 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 66c81ece0095c5d9486cc4cddd1ad14f7ff6012f..096997042ba104fc3b2d6947e06f55c138da8e5f 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -648,6 +648,8 @@
kMaxResourceRequestsPerFlushWhenThrottled));
resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get());
+ media_stream_center_ = nullptr;
+
blob_message_filter_ = new BlobMessageFilter(GetFileThreadTaskRunner());
AddFilter(blob_message_filter_.get());
db_message_filter_ = new DBMessageFilter();
@@ -1982,22 +1984,20 @@
return layout_test_deps_->RequestCopyOfOutput(routing_id, std::move(request));
}
-std::unique_ptr<blink::WebMediaStreamCenter>
-RenderThreadImpl::CreateMediaStreamCenter(
+blink::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
blink::WebMediaStreamCenterClient* client) {
- std::unique_ptr<blink::WebMediaStreamCenter> media_stream_center;
#if BUILDFLAG(ENABLE_WEBRTC)
- if (!media_stream_center) {
- media_stream_center =
- GetContentClient()->renderer()->OverrideCreateWebMediaStreamCenter(
- client);
- if (!media_stream_center) {
- media_stream_center = base::MakeUnique<MediaStreamCenter>(
- client, GetPeerConnectionDependencyFactory());
+ if (!media_stream_center_) {
+ media_stream_center_ = GetContentClient()->renderer()
+ ->OverrideCreateWebMediaStreamCenter(client);
+ if (!media_stream_center_) {
+ std::unique_ptr<MediaStreamCenter> media_stream_center(
+ new MediaStreamCenter(client, GetPeerConnectionDependencyFactory()));
+ media_stream_center_ = media_stream_center.release();
}
}
#endif
- return media_stream_center;
+ return media_stream_center_;
}
#if BUILDFLAG(ENABLE_WEBRTC)
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698