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

Unified Diff: content/browser/renderer_host/media/video_capture_host.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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/browser/renderer_host/media/video_capture_host.cc
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 91d8f5173d505bab9a7a99bea8fe02b24c5b122c..9c4fc77a2dafaee5b5b2e81963776577fd1e6e74 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -32,7 +32,7 @@ void VideoCaptureHost::OnChannelClosing() {
// Since the IPC channel is gone, close all requested VideCaptureDevices.
for (EntryMap::iterator it = entries_.begin(); it != entries_.end(); it++) {
- VideoCaptureController* controller = it->second->controller;
+ VideoCaptureController* controller = it->second->controller.get();
if (controller) {
VideoCaptureControllerID controller_id(it->first);
controller->StopCapture(controller_id, this);
@@ -255,7 +255,7 @@ void VideoCaptureHost::OnReceiveEmptyBuffer(int device_id, int buffer_id) {
EntryMap::iterator it = entries_.find(controller_id);
if (it != entries_.end()) {
scoped_refptr<VideoCaptureController> controller = it->second->controller;
- if (controller)
+ if (controller.get())
controller->ReturnBuffer(controller_id, this, buffer_id);
}
}
@@ -268,7 +268,7 @@ void VideoCaptureHost::DeleteVideoCaptureControllerOnIOThread(
if (it == entries_.end())
return;
- VideoCaptureController* controller = it->second->controller;
+ VideoCaptureController* controller = it->second->controller.get();
if (controller) {
controller->StopCapture(controller_id, this);
GetVideoCaptureManager()->RemoveController(controller, this);

Powered by Google App Engine
This is Rietveld 408576698