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

Unified Diff: apps/moterm/moterm_driver.cc

Issue 1363183004: Files services library: Add an "output stream" file impl helper class. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: files_impl Created 5 years, 3 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 | « apps/moterm/moterm_driver.h ('k') | mojo/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/moterm/moterm_driver.cc
diff --git a/apps/moterm/moterm_driver.cc b/apps/moterm/moterm_driver.cc
index fde274c1702f460470f18cc6b2dc8e773198ddad..85b0bd163c43bca112b81c5b9f3645a37b321754 100644
--- a/apps/moterm/moterm_driver.cc
+++ b/apps/moterm/moterm_driver.cc
@@ -187,6 +187,7 @@ void MotermDriver::Close(const CloseCallback& callback) {
return;
}
+ is_closed_ = true;
callback.Run(mojo::files::ERROR_OK);
// TODO(vtl): Call pending read callbacks?
@@ -240,8 +241,7 @@ void MotermDriver::Write(mojo::Array<uint8_t> bytes_to_write,
return;
}
- HandleOutput(static_cast<const uint8_t*>(&bytes_to_write.front()),
- bytes_to_write.size());
+ HandleOutput(&bytes_to_write.front(), bytes_to_write.size());
// TODO(vtl): Is this OK if the client detached (and we're destroyed?).
callback.Run(mojo::files::ERROR_OK,
« no previous file with comments | « apps/moterm/moterm_driver.h ('k') | mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698