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

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

Issue 2539383002: Replace base::File wrapping with typemapping. (Closed)
Patch Set: Created 4 years 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/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 69aba5e1fa8451411eba0fa848f62a7ec0998ba8..4c1473715e383a8235159864ca6136ee776f1157 100644
--- a/components/font_service/public/cpp/font_service_thread.cc
+++ b/components/font_service/public/cpp/font_service_thread.cc
@@ -10,7 +10,6 @@
#include "base/files/file.h"
#include "base/synchronization/waitable_event.h"
#include "components/font_service/public/cpp/mapped_font_file.h"
-#include "mojo/public/cpp/system/platform_handle.h"
namespace font_service {
namespace internal {
@@ -158,15 +157,9 @@ void FontServiceThread::OpenStreamImpl(base::WaitableEvent* done_event,
void FontServiceThread::OnOpenStreamComplete(base::WaitableEvent* done_event,
base::File* output_file,
- mojo::ScopedHandle handle) {
+ base::File file) {
pending_waitable_events_.erase(done_event);
- if (handle.is_valid()) {
- base::PlatformFile platform_file;
- CHECK_EQ(mojo::UnwrapPlatformFile(std::move(handle), &platform_file),
- MOJO_RESULT_OK);
- *output_file = base::File(platform_file);
- }
-
+ *output_file = std::move(file);
done_event->Signal();
}

Powered by Google App Engine
This is Rietveld 408576698