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

Unified Diff: chrome/gpu/gpu_arc_video_service.cc

Issue 2026533002: Utilize new mojo::UnwrapPlatformFile function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_arc_video_service.cc
diff --git a/chrome/gpu/gpu_arc_video_service.cc b/chrome/gpu/gpu_arc_video_service.cc
index 3c0c7536aac1b4700ac7208187844ad3dc31d08b..3d788ec4c2fc2fde1bc9e4a39d4540f24e6a5a7c 100644
--- a/chrome/gpu/gpu_arc_video_service.cc
+++ b/chrome/gpu/gpu_arc_video_service.cc
@@ -10,8 +10,8 @@
#include "base/logging.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/gpu/arc_gpu_video_decode_accelerator.h"
-#include "mojo/edk/embedder/embedder.h"
#include "mojo/public/cpp/bindings/type_converter.h"
+#include "mojo/public/cpp/system/platform_handle.h"
namespace {
void OnConnectionError() {
@@ -153,17 +153,17 @@ base::ScopedFD GpuArcVideoService::UnwrapFdFromMojoHandle(
return base::ScopedFD();
}
- mojo::edk::ScopedPlatformHandle scoped_platform_handle;
- MojoResult mojo_result = mojo::edk::PassWrappedPlatformHandle(
- handle.release().value(), &scoped_platform_handle);
+ base::PlatformFile platform_file;
+ MojoResult mojo_result =
+ mojo::UnwrapPlatformFile(std::move(handle), &platform_file);
if (mojo_result != MOJO_RESULT_OK) {
- LOG(ERROR) << "PassWrappedPlatformHandle failed: " << mojo_result;
+ LOG(ERROR) << "UnwrapPlatformFile failed: " << mojo_result;
client_->OnError(
::arc::mojom::VideoAcceleratorServiceClient::Error::PLATFORM_FAILURE);
return base::ScopedFD();
}
- return base::ScopedFD(scoped_platform_handle.release().handle);
+ return base::ScopedFD(platform_file);
}
void GpuArcVideoService::BindSharedMemory(::arc::mojom::PortType port,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698