OLD | NEW |
---|---|
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 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1076 headers.set_priority(spdy_priority); | 1076 headers.set_priority(spdy_priority); |
1077 headers.set_has_priority(true); | 1077 headers.set_has_priority(true); |
1078 headers.set_fin((flags & CONTROL_FLAG_FIN) != 0); | 1078 headers.set_fin((flags & CONTROL_FLAG_FIN) != 0); |
1079 headers.set_name_value_block(block); | 1079 headers.set_name_value_block(block); |
1080 syn_frame.reset(buffered_spdy_framer_->SerializeFrame(headers)); | 1080 syn_frame.reset(buffered_spdy_framer_->SerializeFrame(headers)); |
1081 } | 1081 } |
1082 | 1082 |
1083 streams_initiated_count_++; | 1083 streams_initiated_count_++; |
1084 | 1084 |
1085 if (net_log().IsLogging()) { | 1085 if (net_log().IsLogging()) { |
1086 net_log().AddEvent(NetLog::TYPE_HTTP2_SESSION_SYN_STREAM, | 1086 const NetLog::EventType type = |
1087 (GetProtocolVersion() <= SPDY3) | |
1088 ? NetLog::TYPE_HTTP2_SESSION_SYN_STREAM | |
1089 : NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS; | |
mmenke
2015/02/26 16:04:20
optional nit: const generally isn't used for thin
| |
1090 net_log().AddEvent(type, | |
1087 base::Bind(&NetLogSpdySynStreamSentCallback, &block, | 1091 base::Bind(&NetLogSpdySynStreamSentCallback, &block, |
1088 (flags & CONTROL_FLAG_FIN) != 0, | 1092 (flags & CONTROL_FLAG_FIN) != 0, |
1089 (flags & CONTROL_FLAG_UNIDIRECTIONAL) != 0, | 1093 (flags & CONTROL_FLAG_UNIDIRECTIONAL) != 0, |
1090 spdy_priority, stream_id)); | 1094 spdy_priority, stream_id)); |
1091 } | 1095 } |
1092 | 1096 |
1093 return syn_frame.Pass(); | 1097 return syn_frame.Pass(); |
1094 } | 1098 } |
1095 | 1099 |
1096 scoped_ptr<SpdyBuffer> SpdySession::CreateDataBuffer(SpdyStreamId stream_id, | 1100 scoped_ptr<SpdyBuffer> SpdySession::CreateDataBuffer(SpdyStreamId stream_id, |
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3264 if (!queue->empty()) { | 3268 if (!queue->empty()) { |
3265 SpdyStreamId stream_id = queue->front(); | 3269 SpdyStreamId stream_id = queue->front(); |
3266 queue->pop_front(); | 3270 queue->pop_front(); |
3267 return stream_id; | 3271 return stream_id; |
3268 } | 3272 } |
3269 } | 3273 } |
3270 return 0; | 3274 return 0; |
3271 } | 3275 } |
3272 | 3276 |
3273 } // namespace net | 3277 } // namespace net |
OLD | NEW |