| 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 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3076     pending_request->OnRequestCompleteSuccess(stream); | 3076     pending_request->OnRequestCompleteSuccess(stream); | 
| 3077     return; | 3077     return; | 
| 3078   } | 3078   } | 
| 3079   DCHECK(!stream); | 3079   DCHECK(!stream); | 
| 3080 | 3080 | 
| 3081   if (rv != ERR_IO_PENDING) { | 3081   if (rv != ERR_IO_PENDING) { | 
| 3082     pending_request->OnRequestCompleteFailure(rv); | 3082     pending_request->OnRequestCompleteFailure(rv); | 
| 3083   } | 3083   } | 
| 3084 } | 3084 } | 
| 3085 | 3085 | 
| 3086 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |  | 
| 3087   if (!is_secure_) |  | 
| 3088     return NULL; |  | 
| 3089   SSLClientSocket* ssl_socket = |  | 
| 3090       reinterpret_cast<SSLClientSocket*>(connection_->socket()); |  | 
| 3091   DCHECK(ssl_socket); |  | 
| 3092   return ssl_socket; |  | 
| 3093 } |  | 
| 3094 |  | 
| 3095 void SpdySession::OnWriteBufferConsumed( | 3086 void SpdySession::OnWriteBufferConsumed( | 
| 3096     size_t frame_payload_size, | 3087     size_t frame_payload_size, | 
| 3097     size_t consume_size, | 3088     size_t consume_size, | 
| 3098     SpdyBuffer::ConsumeSource consume_source) { | 3089     SpdyBuffer::ConsumeSource consume_source) { | 
| 3099   // We can be called with |in_io_loop_| set if a write SpdyBuffer is | 3090   // We can be called with |in_io_loop_| set if a write SpdyBuffer is | 
| 3100   // deleted (e.g., a stream is closed due to incoming data). | 3091   // deleted (e.g., a stream is closed due to incoming data). | 
| 3101 | 3092 | 
| 3102   DCHECK_EQ(flow_control_state_, FLOW_CONTROL_STREAM_AND_SESSION); | 3093   DCHECK_EQ(flow_control_state_, FLOW_CONTROL_STREAM_AND_SESSION); | 
| 3103 | 3094 | 
| 3104   if (consume_source == SpdyBuffer::DISCARD) { | 3095   if (consume_source == SpdyBuffer::DISCARD) { | 
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3268     if (!queue->empty()) { | 3259     if (!queue->empty()) { | 
| 3269       SpdyStreamId stream_id = queue->front(); | 3260       SpdyStreamId stream_id = queue->front(); | 
| 3270       queue->pop_front(); | 3261       queue->pop_front(); | 
| 3271       return stream_id; | 3262       return stream_id; | 
| 3272     } | 3263     } | 
| 3273   } | 3264   } | 
| 3274   return 0; | 3265   return 0; | 
| 3275 } | 3266 } | 
| 3276 | 3267 | 
| 3277 }  // namespace net | 3268 }  // namespace net | 
| OLD | NEW | 
|---|