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

Unified Diff: mojo/edk/system/core.cc

Issue 1885663002: EDK: Add implementation of data pipe producer write threshold stuff. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 | « mojo/edk/system/core.h ('k') | mojo/edk/system/core_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index c0cdd3f3e1fc221e581e4d9b158f2d5969a9b30c..ecde52e9c64dadb33ed3b587962b3d60a69cb209 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -405,6 +405,29 @@ MojoResult Core::CreateDataPipe(
return MOJO_RESULT_OK;
}
+MojoResult Core::SetDataPipeProducerOptions(
+ MojoHandle data_pipe_producer_handle,
+ UserPointer<const MojoDataPipeProducerOptions> options) {
+ RefPtr<Dispatcher> dispatcher;
+ MojoResult result = GetDispatcher(data_pipe_producer_handle, &dispatcher);
+ if (result != MOJO_RESULT_OK)
+ return result;
+
+ return dispatcher->SetDataPipeProducerOptions(options);
+}
+
+MojoResult Core::GetDataPipeProducerOptions(
+ MojoHandle data_pipe_producer_handle,
+ UserPointer<MojoDataPipeProducerOptions> options,
+ uint32_t options_num_bytes) {
+ RefPtr<Dispatcher> dispatcher;
+ MojoResult result = GetDispatcher(data_pipe_producer_handle, &dispatcher);
+ if (result != MOJO_RESULT_OK)
+ return result;
+
+ return dispatcher->GetDataPipeProducerOptions(options, options_num_bytes);
+}
+
MojoResult Core::WriteData(MojoHandle data_pipe_producer_handle,
UserPointer<const void> elements,
UserPointer<uint32_t> num_bytes,
« no previous file with comments | « mojo/edk/system/core.h ('k') | mojo/edk/system/core_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698