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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Minimum seconds that unclaimed pushed streams will be kept in memory. | 59 // Minimum seconds that unclaimed pushed streams will be kept in memory. |
60 const int kMinPushedStreamLifetimeSeconds = 300; | 60 const int kMinPushedStreamLifetimeSeconds = 300; |
61 | 61 |
62 scoped_ptr<base::ListValue> SpdyHeaderBlockToListValue( | 62 scoped_ptr<base::ListValue> SpdyHeaderBlockToListValue( |
63 const SpdyHeaderBlock& headers, | 63 const SpdyHeaderBlock& headers, |
64 NetLogCaptureMode capture_mode) { | 64 NetLogCaptureMode capture_mode) { |
65 scoped_ptr<base::ListValue> headers_list(new base::ListValue()); | 65 scoped_ptr<base::ListValue> headers_list(new base::ListValue()); |
66 for (SpdyHeaderBlock::const_iterator it = headers.begin(); | 66 for (SpdyHeaderBlock::const_iterator it = headers.begin(); |
67 it != headers.end(); ++it) { | 67 it != headers.end(); ++it) { |
68 headers_list->AppendString( | 68 headers_list->AppendString( |
69 it->first + ": " + | 69 it->first.as_string() + ": " + |
70 ElideHeaderValueForNetLog(capture_mode, it->first, it->second)); | 70 ElideHeaderValueForNetLog(capture_mode, it->first.as_string(), |
| 71 it->second.as_string())); |
71 } | 72 } |
72 return headers_list.Pass(); | 73 return headers_list.Pass(); |
73 } | 74 } |
74 | 75 |
75 scoped_ptr<base::Value> NetLogSpdySynStreamSentCallback( | 76 scoped_ptr<base::Value> NetLogSpdySynStreamSentCallback( |
76 const SpdyHeaderBlock* headers, | 77 const SpdyHeaderBlock* headers, |
77 bool fin, | 78 bool fin, |
78 bool unidirectional, | 79 bool unidirectional, |
79 SpdyPriority spdy_priority, | 80 SpdyPriority spdy_priority, |
80 SpdyStreamId stream_id, | 81 SpdyStreamId stream_id, |
(...skipping 3178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3259 if (!queue->empty()) { | 3260 if (!queue->empty()) { |
3260 SpdyStreamId stream_id = queue->front(); | 3261 SpdyStreamId stream_id = queue->front(); |
3261 queue->pop_front(); | 3262 queue->pop_front(); |
3262 return stream_id; | 3263 return stream_id; |
3263 } | 3264 } |
3264 } | 3265 } |
3265 return 0; | 3266 return 0; |
3266 } | 3267 } |
3267 | 3268 |
3268 } // namespace net | 3269 } // namespace net |
OLD | NEW |