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

Unified Diff: components/font_service/font_service_app.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
Index: components/font_service/font_service_app.cc
diff --git a/components/font_service/font_service_app.cc b/components/font_service/font_service_app.cc
index eb28bccf0eef0f795caf4a667610f371bc786cb3..b0d85a295e49ae0bcff38f1a2a52425bf103fbba 100644
--- a/components/font_service/font_service_app.cc
+++ b/components/font_service/font_service_app.cc
@@ -8,7 +8,7 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
-#include "mojo/platform_handle/platform_handle_functions.h"
+#include "mojo/public/cpp/system/platform_handle.h"
#include "services/shell/public/cpp/connection.h"
static_assert(
@@ -37,16 +37,7 @@ mojo::ScopedHandle GetHandleForPath(const base::FilePath& path) {
return mojo::ScopedHandle();
}
- MojoHandle mojo_handle;
- MojoResult create_result =
- MojoCreatePlatformHandleWrapper(file.TakePlatformFile(), &mojo_handle);
- if (create_result != MOJO_RESULT_OK) {
- LOG(WARNING) << "unable to create wrapper, path=" << path.value()
- << "result=" << create_result;
- return mojo::ScopedHandle();
- }
-
- return mojo::ScopedHandle(mojo::Handle(mojo_handle));
+ return mojo::WrapPlatformFile(file.TakePlatformFile());
}
} // namespace
« no previous file with comments | « components/filesystem/file_impl_unittest.cc ('k') | components/font_service/public/cpp/font_service_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698