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 #include "content/browser/byte_stream.h" | 5 #include "content/browser/byte_stream.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/sequenced_task_runner.h" | 15 #include "base/sequenced_task_runner.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 namespace { | 18 namespace { |
18 | 19 |
19 typedef std::deque<std::pair<scoped_refptr<net::IOBuffer>, size_t> > | 20 typedef std::deque<std::pair<scoped_refptr<net::IOBuffer>, size_t> > |
20 ContentVector; | 21 ContentVector; |
21 | 22 |
22 class ByteStreamReaderImpl; | 23 class ByteStreamReaderImpl; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 ByteStreamReaderImpl* out = new ByteStreamReaderImpl( | 458 ByteStreamReaderImpl* out = new ByteStreamReaderImpl( |
458 output_task_runner, output_flag, buffer_size); | 459 output_task_runner, output_flag, buffer_size); |
459 | 460 |
460 in->SetPeer(out, output_task_runner, output_flag); | 461 in->SetPeer(out, output_task_runner, output_flag); |
461 out->SetPeer(in, input_task_runner, input_flag); | 462 out->SetPeer(in, input_task_runner, input_flag); |
462 input->reset(in); | 463 input->reset(in); |
463 output->reset(out); | 464 output->reset(out); |
464 } | 465 } |
465 | 466 |
466 } // namespace content | 467 } // namespace content |
OLD | NEW |