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 <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 ActiveStreamMap::iterator it = active_streams_.find(stream_id); | 1180 ActiveStreamMap::iterator it = active_streams_.find(stream_id); |
1181 if (it == active_streams_.end()) { | 1181 if (it == active_streams_.end()) { |
1182 NOTREACHED(); | 1182 NOTREACHED(); |
1183 return; | 1183 return; |
1184 } | 1184 } |
1185 | 1185 |
1186 ResetStreamIterator(it, status, description); | 1186 ResetStreamIterator(it, status, description); |
1187 } | 1187 } |
1188 | 1188 |
1189 bool SpdySession::IsStreamActive(SpdyStreamId stream_id) const { | 1189 bool SpdySession::IsStreamActive(SpdyStreamId stream_id) const { |
1190 return ContainsKey(active_streams_, stream_id); | 1190 return base::ContainsKey(active_streams_, stream_id); |
1191 } | 1191 } |
1192 | 1192 |
1193 LoadState SpdySession::GetLoadState() const { | 1193 LoadState SpdySession::GetLoadState() const { |
1194 // Just report that we're idle since the session could be doing | 1194 // Just report that we're idle since the session could be doing |
1195 // many things concurrently. | 1195 // many things concurrently. |
1196 return LOAD_STATE_IDLE; | 1196 return LOAD_STATE_IDLE; |
1197 } | 1197 } |
1198 | 1198 |
1199 void SpdySession::CloseActiveStreamIterator(ActiveStreamMap::iterator it, | 1199 void SpdySession::CloseActiveStreamIterator(ActiveStreamMap::iterator it, |
1200 int status) { | 1200 int status) { |
(...skipping 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3147 if (!queue->empty()) { | 3147 if (!queue->empty()) { |
3148 SpdyStreamId stream_id = queue->front(); | 3148 SpdyStreamId stream_id = queue->front(); |
3149 queue->pop_front(); | 3149 queue->pop_front(); |
3150 return stream_id; | 3150 return stream_id; |
3151 } | 3151 } |
3152 } | 3152 } |
3153 return 0; | 3153 return 0; |
3154 } | 3154 } |
3155 | 3155 |
3156 } // namespace net | 3156 } // namespace net |
OLD | NEW |