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

Side by Side Diff: net/http/http_pipelined_stream.cc

Issue 8432024: Correctly create a new stream when the server requires authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 } else {
mmenke 2011/11/01 14:21:55 nit: It's chrome style not to use else statements
77 return NULL;
78 }
76 } 79 }
77 80
78 bool HttpPipelinedStream::IsResponseBodyComplete() const { 81 bool HttpPipelinedStream::IsResponseBodyComplete() const {
79 return pipeline_->IsResponseBodyComplete(pipeline_id_); 82 return pipeline_->IsResponseBodyComplete(pipeline_id_);
80 } 83 }
81 84
82 bool HttpPipelinedStream::CanFindEndOfResponse() const { 85 bool HttpPipelinedStream::CanFindEndOfResponse() const {
83 return pipeline_->CanFindEndOfResponse(pipeline_id_); 86 return pipeline_->CanFindEndOfResponse(pipeline_id_);
84 } 87 }
85 88
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 136
134 const NetLog::Source& HttpPipelinedStream::source() const { 137 const NetLog::Source& HttpPipelinedStream::source() const {
135 return pipeline_->source(); 138 return pipeline_->source();
136 } 139 }
137 140
138 bool HttpPipelinedStream::was_npn_negotiated() const { 141 bool HttpPipelinedStream::was_npn_negotiated() const {
139 return pipeline_->was_npn_negotiated(); 142 return pipeline_->was_npn_negotiated();
140 } 143 }
141 144
142 } // namespace net 145 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698