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

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

Issue 1263803002: Replace SpdyNameValueBlock typedef with SpdyHeaderBlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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_protocol.cc ('k') | net/spdy/spdy_test_util_common.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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 ConvertRequestPriorityToSpdyPriority(priority, GetProtocolVersion()); 1069 ConvertRequestPriorityToSpdyPriority(priority, GetProtocolVersion());
1070 1070
1071 scoped_ptr<SpdyFrame> syn_frame; 1071 scoped_ptr<SpdyFrame> syn_frame;
1072 // TODO(hkhalil): Avoid copy of |block|. 1072 // TODO(hkhalil): Avoid copy of |block|.
1073 if (GetProtocolVersion() <= SPDY3) { 1073 if (GetProtocolVersion() <= SPDY3) {
1074 SpdySynStreamIR syn_stream(stream_id); 1074 SpdySynStreamIR syn_stream(stream_id);
1075 syn_stream.set_associated_to_stream_id(0); 1075 syn_stream.set_associated_to_stream_id(0);
1076 syn_stream.set_priority(spdy_priority); 1076 syn_stream.set_priority(spdy_priority);
1077 syn_stream.set_fin((flags & CONTROL_FLAG_FIN) != 0); 1077 syn_stream.set_fin((flags & CONTROL_FLAG_FIN) != 0);
1078 syn_stream.set_unidirectional((flags & CONTROL_FLAG_UNIDIRECTIONAL) != 0); 1078 syn_stream.set_unidirectional((flags & CONTROL_FLAG_UNIDIRECTIONAL) != 0);
1079 syn_stream.set_name_value_block(block); 1079 syn_stream.set_header_block(block);
1080 syn_frame.reset(buffered_spdy_framer_->SerializeFrame(syn_stream)); 1080 syn_frame.reset(buffered_spdy_framer_->SerializeFrame(syn_stream));
1081 } else { 1081 } else {
1082 SpdyHeadersIR headers(stream_id); 1082 SpdyHeadersIR headers(stream_id);
1083 headers.set_priority(spdy_priority); 1083 headers.set_priority(spdy_priority);
1084 headers.set_has_priority(true); 1084 headers.set_has_priority(true);
1085 headers.set_fin((flags & CONTROL_FLAG_FIN) != 0); 1085 headers.set_fin((flags & CONTROL_FLAG_FIN) != 0);
1086 headers.set_name_value_block(block); 1086 headers.set_header_block(block);
1087 syn_frame.reset(buffered_spdy_framer_->SerializeFrame(headers)); 1087 syn_frame.reset(buffered_spdy_framer_->SerializeFrame(headers));
1088 } 1088 }
1089 1089
1090 streams_initiated_count_++; 1090 streams_initiated_count_++;
1091 1091
1092 if (net_log().IsCapturing()) { 1092 if (net_log().IsCapturing()) {
1093 const NetLog::EventType type = 1093 const NetLog::EventType type =
1094 (GetProtocolVersion() <= SPDY3) 1094 (GetProtocolVersion() <= SPDY3)
1095 ? NetLog::TYPE_HTTP2_SESSION_SYN_STREAM 1095 ? NetLog::TYPE_HTTP2_SESSION_SYN_STREAM
1096 : NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS; 1096 : NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS;
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3268 if (!queue->empty()) { 3268 if (!queue->empty()) {
3269 SpdyStreamId stream_id = queue->front(); 3269 SpdyStreamId stream_id = queue->front();
3270 queue->pop_front(); 3270 queue->pop_front();
3271 return stream_id; 3271 return stream_id;
3272 } 3272 }
3273 } 3273 }
3274 return 0; 3274 return 0;
3275 } 3275 }
3276 3276
3277 } // namespace net 3277 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_protocol.cc ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698