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

Unified Diff: media/capture/video/video_capture_buffer_pool_impl.cc

Issue 2410383002: VideoCapture: more migration IPC-->mojo, part 6 (Closed)
Patch Set: Comment correction Created 4 years, 2 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: media/capture/video/video_capture_buffer_pool_impl.cc
diff --git a/media/capture/video/video_capture_buffer_pool_impl.cc b/media/capture/video/video_capture_buffer_pool_impl.cc
index 6c8dcff3accb209c11fff0b53765dae4b387e268..d64709e5983eadc2288684b8a933234a7add7fe6 100644
--- a/media/capture/video/video_capture_buffer_pool_impl.cc
+++ b/media/capture/video/video_capture_buffer_pool_impl.cc
@@ -30,21 +30,16 @@ VideoCaptureBufferPoolImpl::~VideoCaptureBufferPoolImpl() {
base::STLDeleteValues(&trackers_);
}
-bool VideoCaptureBufferPoolImpl::ShareToProcess(
- int buffer_id,
- base::ProcessHandle process_handle,
- base::SharedMemoryHandle* new_handle) {
+mojo::ScopedSharedBufferHandle VideoCaptureBufferPoolImpl::GetHandleForTransit(
+ int buffer_id) {
base::AutoLock lock(lock_);
VideoCaptureBufferTracker* tracker = GetTracker(buffer_id);
if (!tracker) {
NOTREACHED() << "Invalid buffer_id.";
- return false;
+ return mojo::ScopedSharedBufferHandle();
}
- if (tracker->ShareToProcess(process_handle, new_handle))
- return true;
- DPLOG(ERROR) << "Error mapping memory";
- return false;
+ return tracker->GetHandleForTransit();
}
std::unique_ptr<VideoCaptureBufferHandle>

Powered by Google App Engine
This is Rietveld 408576698