OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/http/http_pipelined_stream.h" | 5 #include "net/http/http_pipelined_stream.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/http/http_pipelined_connection_impl.h" | 10 #include "net/http/http_pipelined_connection_impl.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 int HttpPipelinedStream::ReadResponseBody(IOBuffer* buf, int buf_len, | 64 int HttpPipelinedStream::ReadResponseBody(IOBuffer* buf, int buf_len, |
65 OldCompletionCallback* callback) { | 65 OldCompletionCallback* callback) { |
66 return pipeline_->ReadResponseBody(pipeline_id_, buf, buf_len, callback); | 66 return pipeline_->ReadResponseBody(pipeline_id_, buf, buf_len, callback); |
67 } | 67 } |
68 | 68 |
69 void HttpPipelinedStream::Close(bool not_reusable) { | 69 void HttpPipelinedStream::Close(bool not_reusable) { |
70 pipeline_->Close(pipeline_id_, not_reusable); | 70 pipeline_->Close(pipeline_id_, not_reusable); |
71 } | 71 } |
72 | 72 |
73 HttpStream* HttpPipelinedStream::RenewStreamForAuth() { | 73 HttpStream* HttpPipelinedStream::RenewStreamForAuth() { |
74 // FIXME: What does this mean on a pipeline? Is it for proxies? | 74 if (pipeline_->usable()) { |
75 return new HttpPipelinedStream(pipeline_, pipeline_id_); | 75 return pipeline_->CreateNewStream(); |
| 76 } |
| 77 return NULL; |
76 } | 78 } |
77 | 79 |
78 bool HttpPipelinedStream::IsResponseBodyComplete() const { | 80 bool HttpPipelinedStream::IsResponseBodyComplete() const { |
79 return pipeline_->IsResponseBodyComplete(pipeline_id_); | 81 return pipeline_->IsResponseBodyComplete(pipeline_id_); |
80 } | 82 } |
81 | 83 |
82 bool HttpPipelinedStream::CanFindEndOfResponse() const { | 84 bool HttpPipelinedStream::CanFindEndOfResponse() const { |
83 return pipeline_->CanFindEndOfResponse(pipeline_id_); | 85 return pipeline_->CanFindEndOfResponse(pipeline_id_); |
84 } | 86 } |
85 | 87 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 135 |
134 const NetLog::Source& HttpPipelinedStream::source() const { | 136 const NetLog::Source& HttpPipelinedStream::source() const { |
135 return pipeline_->source(); | 137 return pipeline_->source(); |
136 } | 138 } |
137 | 139 |
138 bool HttpPipelinedStream::was_npn_negotiated() const { | 140 bool HttpPipelinedStream::was_npn_negotiated() const { |
139 return pipeline_->was_npn_negotiated(); | 141 return pipeline_->was_npn_negotiated(); |
140 } | 142 } |
141 | 143 |
142 } // namespace net | 144 } // namespace net |
OLD | NEW |