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

Unified Diff: components/filesystem/directory_impl.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 | « no previous file | components/filesystem/file_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/directory_impl.cc
diff --git a/components/filesystem/directory_impl.cc b/components/filesystem/directory_impl.cc
index 8df2b122d8941a950c2b3f5372a9b46fb4d3fefe..835a0f22029fcdf7bf8ae0a6ec4903ee4901372a 100644
--- a/components/filesystem/directory_impl.cc
+++ b/components/filesystem/directory_impl.cc
@@ -16,7 +16,7 @@
#include "components/filesystem/lock_table.h"
#include "components/filesystem/util.h"
#include "mojo/common/common_type_converters.h"
-#include "mojo/platform_handle/platform_handle_functions.h"
+#include "mojo/public/cpp/system/platform_handle.h"
namespace filesystem {
@@ -352,16 +352,8 @@ mojo::ScopedHandle DirectoryImpl::OpenFileHandleImpl(
return mojo::ScopedHandle();
}
- MojoHandle mojo_handle;
- MojoResult create_result = MojoCreatePlatformHandleWrapper(
- base_file.TakePlatformFile(), &mojo_handle);
- if (create_result != MOJO_RESULT_OK) {
- *error = mojom::FileError::FAILED;
- return mojo::ScopedHandle();
- }
-
*error = mojom::FileError::OK;
- return mojo::ScopedHandle(mojo::Handle(mojo_handle));
+ return mojo::WrapPlatformFile(base_file.TakePlatformFile());
}
} // namespace filesystem
« no previous file with comments | « no previous file | components/filesystem/file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698