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

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

Issue 699123002: Remove HttpStreamBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
« no previous file with comments | « net/http/http_response_body_drainer.h ('k') | net/http/http_stream.h » ('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_response_body_drainer.h" 5 #include "net/http/http_response_body_drainer.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "net/http/http_network_session.h" 11 #include "net/http/http_network_session.h"
12 #include "net/http/http_stream_base.h" 12 #include "net/http/http_stream.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 HttpResponseBodyDrainer::HttpResponseBodyDrainer(HttpStreamBase* stream) 16 HttpResponseBodyDrainer::HttpResponseBodyDrainer(HttpStream* stream)
17 : stream_(stream), 17 : stream_(stream),
18 next_state_(STATE_NONE), 18 next_state_(STATE_NONE),
19 total_read_(0), 19 total_read_(0),
20 session_(NULL) {} 20 session_(NULL) {}
21 21
22 HttpResponseBodyDrainer::~HttpResponseBodyDrainer() {} 22 HttpResponseBodyDrainer::~HttpResponseBodyDrainer() {}
23 23
24 void HttpResponseBodyDrainer::Start(HttpNetworkSession* session) { 24 void HttpResponseBodyDrainer::Start(HttpNetworkSession* session) {
25 read_buf_ = new IOBuffer(kDrainBodyBufferSize); 25 read_buf_ = new IOBuffer(kDrainBodyBufferSize);
26 next_state_ = STATE_DRAIN_RESPONSE_BODY; 26 next_state_ = STATE_DRAIN_RESPONSE_BODY;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 stream_->Close(true /* no keep-alive */); 117 stream_->Close(true /* no keep-alive */);
118 } else { 118 } else {
119 DCHECK_EQ(OK, result); 119 DCHECK_EQ(OK, result);
120 stream_->Close(false /* keep-alive */); 120 stream_->Close(false /* keep-alive */);
121 } 121 }
122 122
123 delete this; 123 delete this;
124 } 124 }
125 125
126 } // namespace net 126 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_body_drainer.h ('k') | net/http/http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698