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

Unified Diff: media/remoting/demuxer_stream_adapter.cc

Issue 2875143002: Reduce boilerplate when creating simple mojom::URLLoaders. (Closed)
Patch Set: Created 3 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 | « media/mojo/common/mojo_decoder_buffer_converter_unittest.cc ('k') | mojo/public/cpp/system/data_pipe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/demuxer_stream_adapter.cc
diff --git a/media/remoting/demuxer_stream_adapter.cc b/media/remoting/demuxer_stream_adapter.cc
index de8bfd0024d5ced496a58e89da63e9be02d792c5..23ec4f231c2f32c53c9ba72fea1b591666080b8a 100644
--- a/media/remoting/demuxer_stream_adapter.cc
+++ b/media/remoting/demuxer_stream_adapter.cc
@@ -23,13 +23,7 @@ namespace remoting {
mojo::DataPipe* DemuxerStreamAdapter::CreateDataPipe() {
// Capacity in bytes for Mojo data pipe.
constexpr int kMojoDataPipeCapacityInBytes = 512 * 1024;
-
- MojoCreateDataPipeOptions options;
- options.struct_size = sizeof(MojoCreateDataPipeOptions);
- options.flags = MOJO_WRITE_DATA_FLAG_NONE;
- options.element_num_bytes = 1;
- options.capacity_num_bytes = kMojoDataPipeCapacityInBytes;
- return new mojo::DataPipe(options);
+ return new mojo::DataPipe(kMojoDataPipeCapacityInBytes);
}
DemuxerStreamAdapter::DemuxerStreamAdapter(
« no previous file with comments | « media/mojo/common/mojo_decoder_buffer_converter_unittest.cc ('k') | mojo/public/cpp/system/data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698