Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: net/spdy/spdy_session.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/spdy/spdy_headers_block_parser_test.cc ('k') | net/ssl/client_cert_store_chromeos.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/spdy/spdy_headers_block_parser_test.cc ('k') | net/ssl/client_cert_store_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698