| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_DATA_PIPE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_DATA_PIPE_H_ |
| 6 #define MOJO_PUBLIC_CPP_SYSTEM_DATA_PIPE_H_ | 6 #define MOJO_PUBLIC_CPP_SYSTEM_DATA_PIPE_H_ |
| 7 | 7 |
| 8 #include <assert.h> | 8 #include <assert.h> |
| 9 | 9 |
| 10 #include "mojo/public/c/system/data_pipe.h" | 10 #include "mojo/public/c/system/data_pipe.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 DataPipe(); | 113 DataPipe(); |
| 114 explicit DataPipe(const MojoCreateDataPipeOptions& options); | 114 explicit DataPipe(const MojoCreateDataPipeOptions& options); |
| 115 ~DataPipe(); | 115 ~DataPipe(); |
| 116 | 116 |
| 117 ScopedDataPipeProducerHandle producer_handle; | 117 ScopedDataPipeProducerHandle producer_handle; |
| 118 ScopedDataPipeConsumerHandle consumer_handle; | 118 ScopedDataPipeConsumerHandle consumer_handle; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 inline DataPipe::DataPipe() { | 121 inline DataPipe::DataPipe() { |
| 122 MojoResult result MOJO_ALLOW_UNUSED = | 122 MojoResult result MOJO_ALLOW_UNUSED = |
| 123 CreateDataPipe(NULL, &producer_handle, &consumer_handle); | 123 CreateDataPipe(nullptr, &producer_handle, &consumer_handle); |
| 124 assert(result == MOJO_RESULT_OK); | 124 assert(result == MOJO_RESULT_OK); |
| 125 } | 125 } |
| 126 | 126 |
| 127 inline DataPipe::DataPipe(const MojoCreateDataPipeOptions& options) { | 127 inline DataPipe::DataPipe(const MojoCreateDataPipeOptions& options) { |
| 128 MojoResult result MOJO_ALLOW_UNUSED = | 128 MojoResult result MOJO_ALLOW_UNUSED = |
| 129 CreateDataPipe(&options, &producer_handle, &consumer_handle); | 129 CreateDataPipe(&options, &producer_handle, &consumer_handle); |
| 130 assert(result == MOJO_RESULT_OK); | 130 assert(result == MOJO_RESULT_OK); |
| 131 } | 131 } |
| 132 | 132 |
| 133 inline DataPipe::~DataPipe() { | 133 inline DataPipe::~DataPipe() { |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace mojo | 136 } // namespace mojo |
| 137 | 137 |
| 138 #endif // MOJO_PUBLIC_CPP_SYSTEM_DATA_PIPE_H_ | 138 #endif // MOJO_PUBLIC_CPP_SYSTEM_DATA_PIPE_H_ |
| OLD | NEW |