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

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

Issue 10834178: net: Return size of upload as well as position from HttpTransaction::GetUploadProgress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make UploadProgress a class instead of a struct Created 8 years, 3 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
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_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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CHECK(request_info_); 44 CHECK(request_info_);
45 // TODO(simonjam): Proxy support will be needed here. 45 // TODO(simonjam): Proxy support will be needed here.
46 const std::string path = HttpUtil::PathForRequest(request_info_->url); 46 const std::string path = HttpUtil::PathForRequest(request_info_->url);
47 std::string request_line_ = base::StringPrintf("%s %s HTTP/1.1\r\n", 47 std::string request_line_ = base::StringPrintf("%s %s HTTP/1.1\r\n",
48 request_info_->method.c_str(), 48 request_info_->method.c_str(),
49 path.c_str()); 49 path.c_str());
50 return pipeline_->SendRequest(pipeline_id_, request_line_, headers, 50 return pipeline_->SendRequest(pipeline_id_, request_line_, headers,
51 request_body.Pass(), response, callback); 51 request_body.Pass(), response, callback);
52 } 52 }
53 53
54 uint64 HttpPipelinedStream::GetUploadProgress() const { 54 UploadProgress HttpPipelinedStream::GetUploadProgress() const {
55 return pipeline_->GetUploadProgress(pipeline_id_); 55 return pipeline_->GetUploadProgress(pipeline_id_);
56 } 56 }
57 57
58 int HttpPipelinedStream::ReadResponseHeaders( 58 int HttpPipelinedStream::ReadResponseHeaders(
59 const CompletionCallback& callback) { 59 const CompletionCallback& callback) {
60 return pipeline_->ReadResponseHeaders(pipeline_id_, callback); 60 return pipeline_->ReadResponseHeaders(pipeline_id_, callback);
61 } 61 }
62 62
63 const HttpResponseInfo* HttpPipelinedStream::GetResponseInfo() const { 63 const HttpResponseInfo* HttpPipelinedStream::GetResponseInfo() const {
64 return pipeline_->GetResponseInfo(pipeline_id_); 64 return pipeline_->GetResponseInfo(pipeline_id_);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 bool HttpPipelinedStream::was_npn_negotiated() const { 140 bool HttpPipelinedStream::was_npn_negotiated() const {
141 return pipeline_->was_npn_negotiated(); 141 return pipeline_->was_npn_negotiated();
142 } 142 }
143 143
144 NextProto HttpPipelinedStream::protocol_negotiated() const { 144 NextProto HttpPipelinedStream::protocol_negotiated() const {
145 return pipeline_->protocol_negotiated(); 145 return pipeline_->protocol_negotiated();
146 } 146 }
147 147
148 } // namespace net 148 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698