| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 443   DCHECK(request_headers); | 443   DCHECK(request_headers); | 
| 444   for (SpdyHeaderBlock::const_iterator it = headers.begin(); | 444   for (SpdyHeaderBlock::const_iterator it = headers.begin(); | 
| 445        it != headers.end(); | 445        it != headers.end(); | 
| 446        ++it) { | 446        ++it) { | 
| 447     SpdyHeaderBlock* to_insert = response_headers; | 447     SpdyHeaderBlock* to_insert = response_headers; | 
| 448     if (protocol_version == SPDY2) { | 448     if (protocol_version == SPDY2) { | 
| 449       if (it->first == "url") | 449       if (it->first == "url") | 
| 450         to_insert = request_headers; | 450         to_insert = request_headers; | 
| 451     } else { | 451     } else { | 
| 452       const char* host = protocol_version >= SPDY4 ? ":authority" : ":host"; | 452       const char* host = protocol_version >= SPDY4 ? ":authority" : ":host"; | 
| 453       static const char* scheme = ":scheme"; | 453       static const char scheme[] = ":scheme"; | 
| 454       static const char* path = ":path"; | 454       static const char path[] = ":path"; | 
| 455       if (it->first == host || it->first == scheme || it->first == path) | 455       if (it->first == host || it->first == scheme || it->first == path) | 
| 456         to_insert = request_headers; | 456         to_insert = request_headers; | 
| 457     } | 457     } | 
| 458     to_insert->insert(*it); | 458     to_insert->insert(*it); | 
| 459   } | 459   } | 
| 460 } | 460 } | 
| 461 | 461 | 
| 462 SpdyStreamRequest::SpdyStreamRequest() : weak_ptr_factory_(this) { | 462 SpdyStreamRequest::SpdyStreamRequest() : weak_ptr_factory_(this) { | 
| 463   Reset(); | 463   Reset(); | 
| 464 } | 464 } | 
| (...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3291     if (!queue->empty()) { | 3291     if (!queue->empty()) { | 
| 3292       SpdyStreamId stream_id = queue->front(); | 3292       SpdyStreamId stream_id = queue->front(); | 
| 3293       queue->pop_front(); | 3293       queue->pop_front(); | 
| 3294       return stream_id; | 3294       return stream_id; | 
| 3295     } | 3295     } | 
| 3296   } | 3296   } | 
| 3297   return 0; | 3297   return 0; | 
| 3298 } | 3298 } | 
| 3299 | 3299 | 
| 3300 }  // namespace net | 3300 }  // namespace net | 
| OLD | NEW | 
|---|