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

Side by Side Diff: mojo/edk/system/data_pipe.h

Issue 936283002: Oops, calling {Producer,Consumer}CloseImplNoLock() isn't the same as calling {Producer,Consumer}Clo… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe.cc » ('j') | mojo/edk/system/data_pipe.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EDK_SYSTEM_DATA_PIPE_H_ 5 #ifndef MOJO_EDK_SYSTEM_DATA_PIPE_H_
6 #define MOJO_EDK_SYSTEM_DATA_PIPE_H_ 6 #define MOJO_EDK_SYSTEM_DATA_PIPE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 bool ConsumerIsBusy() const; 109 bool ConsumerIsBusy() const;
110 110
111 protected: 111 protected:
112 DataPipe(bool has_local_producer, 112 DataPipe(bool has_local_producer,
113 bool has_local_consumer, 113 bool has_local_consumer,
114 const MojoCreateDataPipeOptions& validated_options); 114 const MojoCreateDataPipeOptions& validated_options);
115 115
116 friend class base::RefCountedThreadSafe<DataPipe>; 116 friend class base::RefCountedThreadSafe<DataPipe>;
117 virtual ~DataPipe(); 117 virtual ~DataPipe();
118 118
119 void ProducerCloseNoLock();
120 void ConsumerCloseNoLock();
121
119 virtual void ProducerCloseImplNoLock() = 0; 122 virtual void ProducerCloseImplNoLock() = 0;
120 // |num_bytes.Get()| will be a nonzero multiple of |element_num_bytes_|. 123 // |num_bytes.Get()| will be a nonzero multiple of |element_num_bytes_|.
121 virtual MojoResult ProducerWriteDataImplNoLock( 124 virtual MojoResult ProducerWriteDataImplNoLock(
122 UserPointer<const void> elements, 125 UserPointer<const void> elements,
123 UserPointer<uint32_t> num_bytes, 126 UserPointer<uint32_t> num_bytes,
124 uint32_t max_num_bytes_to_write, 127 uint32_t max_num_bytes_to_write,
125 uint32_t min_num_bytes_to_write) = 0; 128 uint32_t min_num_bytes_to_write) = 0;
126 virtual MojoResult ProducerBeginWriteDataImplNoLock( 129 virtual MojoResult ProducerBeginWriteDataImplNoLock(
127 UserPointer<void*> buffer, 130 UserPointer<void*> buffer,
128 UserPointer<uint32_t> buffer_num_bytes, 131 UserPointer<uint32_t> buffer_num_bytes,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 uint32_t producer_two_phase_max_num_bytes_written_; 247 uint32_t producer_two_phase_max_num_bytes_written_;
245 uint32_t consumer_two_phase_max_num_bytes_read_; 248 uint32_t consumer_two_phase_max_num_bytes_read_;
246 249
247 DISALLOW_COPY_AND_ASSIGN(DataPipe); 250 DISALLOW_COPY_AND_ASSIGN(DataPipe);
248 }; 251 };
249 252
250 } // namespace system 253 } // namespace system
251 } // namespace mojo 254 } // namespace mojo
252 255
253 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_H_ 256 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe.cc » ('j') | mojo/edk/system/data_pipe.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698