Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_BYTE_STREAM_H_ | 5 #ifndef CONTENT_BROWSER_BYTE_STREAM_H_ |
| 6 #define CONTENT_BROWSER_BYTE_STREAM_H_ | 6 #define CONTENT_BROWSER_BYTE_STREAM_H_ |
| 7 | 7 |
| 8 #include <deque> | |
| 9 #include <set> | |
| 10 #include <utility> | |
| 11 | |
| 12 #include "base/callback.h" | 8 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 14 #include "base/synchronization/lock.h" | 10 #include "base/memory/scoped_ptr.h" |
| 15 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 16 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
| 17 | 13 |
| 18 namespace base { | 14 namespace base { |
| 19 class SequencedTaskRunner; | 15 class SequencedTaskRunner; |
| 20 } | 16 } // namespace base |
|
Randy Smith (Not in Mondays)
2013/08/02 18:43:05
Can you give me a pointer to the section of the st
tyoshino (SeeGerritForStatus)
2013/08/05 07:53:11
Yes, it's not explicitly stated but a common pract
| |
| 21 | 17 |
| 22 namespace content { | 18 namespace content { |
| 23 | 19 |
| 24 // A byte stream is a pipe to transfer bytes between a source and a | 20 // A byte stream is a pipe to transfer bytes between a source and a |
| 25 // sink, which may be on different threads. It is intended to be the | 21 // sink, which may be on different threads. It is intended to be the |
| 26 // only connection between source and sink; they need have no | 22 // only connection between source and sink; they need have no |
| 27 // direct awareness of each other aside from the byte stream. The source and | 23 // direct awareness of each other aside from the byte stream. The source and |
| 28 // the sink have different interfaces to a byte stream, |ByteStreamWriter| | 24 // the sink have different interfaces to a byte stream, |ByteStreamWriter| |
| 29 // and |ByteStreamReader|. A pair of connected interfaces is generated by | 25 // and |ByteStreamReader|. A pair of connected interfaces is generated by |
| 30 // calling |CreateByteStream|. | 26 // calling |CreateByteStream|. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 CONTENT_EXPORT void CreateByteStream( | 190 CONTENT_EXPORT void CreateByteStream( |
| 195 scoped_refptr<base::SequencedTaskRunner> input_task_runner, | 191 scoped_refptr<base::SequencedTaskRunner> input_task_runner, |
| 196 scoped_refptr<base::SequencedTaskRunner> output_task_runner, | 192 scoped_refptr<base::SequencedTaskRunner> output_task_runner, |
| 197 size_t buffer_size, | 193 size_t buffer_size, |
| 198 scoped_ptr<ByteStreamWriter>* input, | 194 scoped_ptr<ByteStreamWriter>* input, |
| 199 scoped_ptr<ByteStreamReader>* output); | 195 scoped_ptr<ByteStreamReader>* output); |
| 200 | 196 |
| 201 } // namespace content | 197 } // namespace content |
| 202 | 198 |
| 203 #endif // CONTENT_BROWSER_BYTE_STREAM_H_ | 199 #endif // CONTENT_BROWSER_BYTE_STREAM_H_ |
| OLD | NEW |