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

Side by Side Diff: net/spdy/spdy_http_stream.cc

Issue 2330983002: Removes get upload progress plumbing. URLRequest queries the UploadDataStream directly. (Closed)
Patch Set: Feedback incorporated. Created 4 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
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_http_stream_unittest.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/spdy/spdy_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 weak_factory_.GetWeakPtr(), callback)); 92 weak_factory_.GetWeakPtr(), callback));
93 93
94 if (rv == OK) { 94 if (rv == OK) {
95 stream_ = stream_request_.ReleaseStream(); 95 stream_ = stream_request_.ReleaseStream();
96 InitializeStreamHelper(); 96 InitializeStreamHelper();
97 } 97 }
98 98
99 return rv; 99 return rv;
100 } 100 }
101 101
102 UploadProgress SpdyHttpStream::GetUploadProgress() const {
103 if (!request_info_ || !HasUploadData())
104 return UploadProgress();
105
106 return UploadProgress(request_info_->upload_data_stream->position(),
107 request_info_->upload_data_stream->size());
108 }
109
110 int SpdyHttpStream::ReadResponseHeaders(const CompletionCallback& callback) { 102 int SpdyHttpStream::ReadResponseHeaders(const CompletionCallback& callback) {
111 CHECK(!callback.is_null()); 103 CHECK(!callback.is_null());
112 if (stream_closed_) 104 if (stream_closed_)
113 return closed_stream_status_; 105 return closed_stream_status_;
114 106
115 CHECK(stream_.get()); 107 CHECK(stream_.get());
116 108
117 // Check if we already have the response headers. If so, return synchronously. 109 // Check if we already have the response headers. If so, return synchronously.
118 if (response_headers_status_ == RESPONSE_HEADERS_ARE_COMPLETE) { 110 if (response_headers_status_ == RESPONSE_HEADERS_ARE_COMPLETE) {
119 CHECK(!stream_->IsIdle()); 111 CHECK(!stream_->IsIdle());
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; 606 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2;
615 return; 607 return;
616 } 608 }
617 609
618 void SpdyHttpStream::SetPriority(RequestPriority priority) { 610 void SpdyHttpStream::SetPriority(RequestPriority priority) {
619 // TODO(akalin): Plumb this through to |stream_request_| and 611 // TODO(akalin): Plumb this through to |stream_request_| and
620 // |stream_|. 612 // |stream_|.
621 } 613 }
622 614
623 } // namespace net 615 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698