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

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

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_transaction_ssl_unittest.cc ('k') | net/http/http_proxy_client_socket.cc » ('j') | 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) 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 "net/http/http_pipelined_connection_impl.h" 5 #include "net/http/http_pipelined_connection_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 int pipeline_id, 673 int pipeline_id,
674 SSLCertRequestInfo* cert_request_info) { 674 SSLCertRequestInfo* cert_request_info) {
675 CHECK(ContainsKey(stream_info_map_, pipeline_id)); 675 CHECK(ContainsKey(stream_info_map_, pipeline_id));
676 CHECK(stream_info_map_[pipeline_id].parser.get()); 676 CHECK(stream_info_map_[pipeline_id].parser.get());
677 stream_info_map_[pipeline_id].parser->GetSSLCertRequestInfo( 677 stream_info_map_[pipeline_id].parser->GetSSLCertRequestInfo(
678 cert_request_info); 678 cert_request_info);
679 } 679 }
680 680
681 void HttpPipelinedConnectionImpl::Drain(HttpPipelinedStream* stream, 681 void HttpPipelinedConnectionImpl::Drain(HttpPipelinedStream* stream,
682 HttpNetworkSession* session) { 682 HttpNetworkSession* session) {
683 HttpResponseHeaders* headers = stream->GetResponseInfo()->headers; 683 HttpResponseHeaders* headers = stream->GetResponseInfo()->headers.get();
684 if (!stream->CanFindEndOfResponse() || headers->IsChunkEncoded() || 684 if (!stream->CanFindEndOfResponse() || headers->IsChunkEncoded() ||
685 !usable_) { 685 !usable_) {
686 // TODO(simonjam): Drain chunk-encoded responses if they're relatively 686 // TODO(simonjam): Drain chunk-encoded responses if they're relatively
687 // common. 687 // common.
688 stream->Close(true); 688 stream->Close(true);
689 delete stream; 689 delete stream;
690 return; 690 return;
691 } 691 }
692 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(stream); 692 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(stream);
693 drainer->StartWithSize(session, headers->GetContentLength()); 693 drainer->StartWithSize(session, headers->GetContentLength());
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 } 832 }
833 833
834 HttpPipelinedConnectionImpl::StreamInfo::StreamInfo() 834 HttpPipelinedConnectionImpl::StreamInfo::StreamInfo()
835 : state(STREAM_CREATED) { 835 : state(STREAM_CREATED) {
836 } 836 }
837 837
838 HttpPipelinedConnectionImpl::StreamInfo::~StreamInfo() { 838 HttpPipelinedConnectionImpl::StreamInfo::~StreamInfo() {
839 } 839 }
840 840
841 } // namespace net 841 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_ssl_unittest.cc ('k') | net/http/http_proxy_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698