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

Unified Diff: mojo/system/shared_buffer_dispatcher.cc

Issue 320343002: Mojo: Make default Options directly accessible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/system/shared_buffer_dispatcher.h ('k') | mojo/system/shared_buffer_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/shared_buffer_dispatcher.cc
diff --git a/mojo/system/shared_buffer_dispatcher.cc b/mojo/system/shared_buffer_dispatcher.cc
index dc7d35cc59b0fb45782a16d9962aebb98829c98c..57f0b6e7482135b49082937882d8085b988ad099 100644
--- a/mojo/system/shared_buffer_dispatcher.cc
+++ b/mojo/system/shared_buffer_dispatcher.cc
@@ -27,17 +27,20 @@ struct SerializedSharedBufferDispatcher {
} // namespace
// static
+const MojoCreateSharedBufferOptions
+ SharedBufferDispatcher::kDefaultCreateOptions = {
+ static_cast<uint32_t>(sizeof(MojoCreateSharedBufferOptions)),
+ MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE
+};
+
+// static
MojoResult SharedBufferDispatcher::ValidateCreateOptions(
const MojoCreateSharedBufferOptions* in_options,
MojoCreateSharedBufferOptions* out_options) {
const MojoCreateSharedBufferOptionsFlags kKnownFlags =
MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE;
- static const MojoCreateSharedBufferOptions kDefaultOptions = {
- static_cast<uint32_t>(sizeof(MojoCreateSharedBufferOptions)),
- MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE
- };
- *out_options = kDefaultOptions;
+ *out_options = kDefaultCreateOptions;
if (!in_options)
return MOJO_RESULT_OK;
« no previous file with comments | « mojo/system/shared_buffer_dispatcher.h ('k') | mojo/system/shared_buffer_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698