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

Side by Side Diff: content/browser/renderer_host/media/media_stream_dispatcher_host.cc

Issue 2256173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace a WrapUnique() nested inside a MakeUnique() Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" 5 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 if (device_change_subscribers_.empty()) 284 if (device_change_subscribers_.empty())
285 media_stream_manager_->CancelDeviceChangeNotifications(this); 285 media_stream_manager_->CancelDeviceChangeNotifications(this);
286 } 286 }
287 287
288 std::unique_ptr<MediaStreamUIProxy> 288 std::unique_ptr<MediaStreamUIProxy>
289 MediaStreamDispatcherHost::CreateMediaStreamUIProxy() { 289 MediaStreamDispatcherHost::CreateMediaStreamUIProxy() {
290 DCHECK_CURRENTLY_ON(BrowserThread::IO); 290 DCHECK_CURRENTLY_ON(BrowserThread::IO);
291 if (use_fake_ui_ || 291 if (use_fake_ui_ ||
292 base::CommandLine::ForCurrentProcess()->HasSwitch( 292 base::CommandLine::ForCurrentProcess()->HasSwitch(
293 switches::kUseFakeUIForMediaStream)) { 293 switches::kUseFakeUIForMediaStream)) {
294 return base::WrapUnique(new FakeMediaStreamUIProxy()); 294 return base::MakeUnique<FakeMediaStreamUIProxy>();
295 } 295 }
296 296
297 return MediaStreamUIProxy::Create(); 297 return MediaStreamUIProxy::Create();
298 } 298 }
299 299
300 void MediaStreamDispatcherHost::HandleCheckAccessResponse( 300 void MediaStreamDispatcherHost::HandleCheckAccessResponse(
301 std::unique_ptr<MediaStreamUIProxy> ui_proxy, 301 std::unique_ptr<MediaStreamUIProxy> ui_proxy,
302 int render_frame_id, 302 int render_frame_id,
303 bool have_access) { 303 bool have_access) {
304 DCHECK_CURRENTLY_ON(BrowserThread::IO); 304 DCHECK_CURRENTLY_ON(BrowserThread::IO);
305 if (have_access) 305 if (have_access)
306 Send(new MediaStreamMsg_DevicesChanged(render_frame_id)); 306 Send(new MediaStreamMsg_DevicesChanged(render_frame_id));
307 } 307 }
308 308
309 void MediaStreamDispatcherHost::OnSetCapturingLinkSecured(int session_id, 309 void MediaStreamDispatcherHost::OnSetCapturingLinkSecured(int session_id,
310 MediaStreamType type, 310 MediaStreamType type,
311 bool is_secure) { 311 bool is_secure) {
312 DCHECK_CURRENTLY_ON(BrowserThread::IO); 312 DCHECK_CURRENTLY_ON(BrowserThread::IO);
313 313
314 media_stream_manager_->SetCapturingLinkSecured(render_process_id_, session_id, 314 media_stream_manager_->SetCapturingLinkSecured(render_process_id_, session_id,
315 type, is_secure); 315 type, is_secure);
316 } 316 }
317 317
318 } // namespace content 318 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698