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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 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_proxy_client_socket.cc ('k') | net/http/http_response_info.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_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"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); 81 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE);
82 82
83 return rv; 83 return rv;
84 } 84 }
85 85
86 int HttpResponseBodyDrainer::DoDrainResponseBody() { 86 int HttpResponseBodyDrainer::DoDrainResponseBody() {
87 next_state_ = STATE_DRAIN_RESPONSE_BODY_COMPLETE; 87 next_state_ = STATE_DRAIN_RESPONSE_BODY_COMPLETE;
88 88
89 return stream_->ReadResponseBody( 89 return stream_->ReadResponseBody(
90 read_buf_, read_size_ - total_read_, 90 read_buf_.get(), read_size_ - total_read_,
91 base::Bind(&HttpResponseBodyDrainer::OnIOComplete, 91 base::Bind(&HttpResponseBodyDrainer::OnIOComplete,
92 base::Unretained(this))); 92 base::Unretained(this)));
93 } 93 }
94 94
95 int HttpResponseBodyDrainer::DoDrainResponseBodyComplete(int result) { 95 int HttpResponseBodyDrainer::DoDrainResponseBodyComplete(int result) {
96 DCHECK_NE(ERR_IO_PENDING, result); 96 DCHECK_NE(ERR_IO_PENDING, result);
97 97
98 if (result < 0) 98 if (result < 0)
99 return result; 99 return result;
100 100
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 stream_->Close(true /* no keep-alive */); 135 stream_->Close(true /* no keep-alive */);
136 } else { 136 } else {
137 DCHECK_EQ(OK, result); 137 DCHECK_EQ(OK, result);
138 stream_->Close(false /* keep-alive */); 138 stream_->Close(false /* keep-alive */);
139 } 139 }
140 140
141 delete this; 141 delete this;
142 } 142 }
143 143
144 } // namespace net 144 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/http/http_response_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698