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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "net/ssl/ssl_connection_status_flags.h" | 44 #include "net/ssl/ssl_connection_status_flags.h" |
45 | 45 |
46 namespace net { | 46 namespace net { |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 const int kReadBufferSize = 8 * 1024; | 50 const int kReadBufferSize = 8 * 1024; |
51 const int kDefaultConnectionAtRiskOfLossSeconds = 10; | 51 const int kDefaultConnectionAtRiskOfLossSeconds = 10; |
52 const int kHungIntervalSeconds = 10; | 52 const int kHungIntervalSeconds = 10; |
53 | 53 |
54 // As we always act as the client, start at 1 for the first stream id. | |
55 const SpdyStreamId kFirstStreamId = 1; | |
56 const SpdyStreamId kLastStreamId = 0x7fffffff; | |
57 | |
58 // Minimum seconds that unclaimed pushed streams will be kept in memory. | 54 // Minimum seconds that unclaimed pushed streams will be kept in memory. |
59 const int kMinPushedStreamLifetimeSeconds = 300; | 55 const int kMinPushedStreamLifetimeSeconds = 300; |
60 | 56 |
61 scoped_ptr<base::ListValue> SpdyHeaderBlockToListValue( | 57 scoped_ptr<base::ListValue> SpdyHeaderBlockToListValue( |
62 const SpdyHeaderBlock& headers, | 58 const SpdyHeaderBlock& headers, |
63 net::NetLog::LogLevel log_level) { | 59 net::NetLog::LogLevel log_level) { |
64 scoped_ptr<base::ListValue> headers_list(new base::ListValue()); | 60 scoped_ptr<base::ListValue> headers_list(new base::ListValue()); |
65 for (SpdyHeaderBlock::const_iterator it = headers.begin(); | 61 for (SpdyHeaderBlock::const_iterator it = headers.begin(); |
66 it != headers.end(); ++it) { | 62 it != headers.end(); ++it) { |
67 headers_list->AppendString( | 63 headers_list->AppendString( |
(...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2941 if (!queue->empty()) { | 2937 if (!queue->empty()) { |
2942 SpdyStreamId stream_id = queue->front(); | 2938 SpdyStreamId stream_id = queue->front(); |
2943 queue->pop_front(); | 2939 queue->pop_front(); |
2944 return stream_id; | 2940 return stream_id; |
2945 } | 2941 } |
2946 } | 2942 } |
2947 return 0; | 2943 return 0; |
2948 } | 2944 } |
2949 | 2945 |
2950 } // namespace net | 2946 } // namespace net |
OLD | NEW |