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

Unified Diff: components/font_service/public/cpp/font_service_thread.cc

Issue 1995753002: [mojo-edk] Expose portable API for platform handle wrapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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 | « components/font_service/font_service_app.cc ('k') | components/leveldb/leveldb_mojo_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/font_service/public/cpp/font_service_thread.cc
diff --git a/components/font_service/public/cpp/font_service_thread.cc b/components/font_service/public/cpp/font_service_thread.cc
index 3d2211107b085bd2d558b44fdd1d6aeadb7ddd7d..c0566ddcf11be958df6c95a8a2e95d1a57a91a5c 100644
--- a/components/font_service/public/cpp/font_service_thread.cc
+++ b/components/font_service/public/cpp/font_service_thread.cc
@@ -10,7 +10,7 @@
#include "base/files/file.h"
#include "base/synchronization/waitable_event.h"
#include "components/font_service/public/cpp/mapped_font_file.h"
-#include "mojo/platform_handle/platform_handle_functions.h"
+#include "mojo/public/cpp/system/platform_handle.h"
namespace font_service {
namespace internal {
@@ -157,10 +157,10 @@ void FontServiceThread::OnOpenStreamComplete(base::WaitableEvent* done_event,
mojo::ScopedHandle handle) {
pending_waitable_events_.erase(done_event);
if (handle.is_valid()) {
- MojoPlatformHandle platform_handle;
- CHECK(MojoExtractPlatformHandle(handle.release().value(),
- &platform_handle) == MOJO_RESULT_OK);
- *output_file = base::File(platform_handle);
+ base::PlatformFile platform_file;
+ CHECK_EQ(mojo::UnwrapPlatformFile(std::move(handle), &platform_file),
+ MOJO_RESULT_OK);
+ *output_file = base::File(platform_file);
}
done_event->Signal();
« no previous file with comments | « components/font_service/font_service_app.cc ('k') | components/leveldb/leveldb_mojo_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698