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

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

Issue 2596703002: http2: Update priorities of pushed streams (Closed)
Patch Set: Created 4 years 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 int SpdyHttpStream::InitializeStream(const HttpRequestInfo* request_info, 64 int SpdyHttpStream::InitializeStream(const HttpRequestInfo* request_info,
65 RequestPriority priority, 65 RequestPriority priority,
66 const NetLogWithSource& stream_net_log, 66 const NetLogWithSource& stream_net_log,
67 const CompletionCallback& callback) { 67 const CompletionCallback& callback) {
68 DCHECK(!stream_); 68 DCHECK(!stream_);
69 if (!spdy_session_) 69 if (!spdy_session_)
70 return ERR_CONNECTION_CLOSED; 70 return ERR_CONNECTION_CLOSED;
71 71
72 request_info_ = request_info; 72 request_info_ = request_info;
73 if (request_info_->method == "GET") { 73 if (request_info_->method == "GET") {
74 int error = spdy_session_->GetPushStream(request_info_->url, &stream_, 74 int error = spdy_session_->GetPushStream(request_info_->url, priority,
75 stream_net_log); 75 &stream_, stream_net_log);
76 if (error != OK) 76 if (error != OK)
77 return error; 77 return error;
78 78
79 // |stream_| may be NULL even if OK was returned. 79 // |stream_| may be NULL even if OK was returned.
80 if (stream_.get()) { 80 if (stream_.get()) {
81 DCHECK_EQ(stream_->type(), SPDY_PUSH_STREAM); 81 DCHECK_EQ(stream_->type(), SPDY_PUSH_STREAM);
82 InitializeStreamHelper(); 82 InitializeStreamHelper();
83 return OK; 83 return OK;
84 } 84 }
85 } 85 }
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; 572 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2;
573 return; 573 return;
574 } 574 }
575 575
576 void SpdyHttpStream::SetPriority(RequestPriority priority) { 576 void SpdyHttpStream::SetPriority(RequestPriority priority) {
577 // TODO(akalin): Plumb this through to |stream_request_| and 577 // TODO(akalin): Plumb this through to |stream_request_| and
578 // |stream_|. 578 // |stream_|.
579 } 579 }
580 580
581 } // namespace net 581 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698