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

Side by Side Diff: net/tools/quic/spdy_utils.cc

Issue 25043005: Add better help information to quic_client and quic_server. Also, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 7 years, 2 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 | Annotate | Revision Log
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/tools/quic/spdy_utils.h" 5 #include "net/tools/quic/spdy_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 BalsaHeaders* request_headers) { 243 BalsaHeaders* request_headers) {
244 typedef SpdyHeaderBlock::const_iterator BlockIt; 244 typedef SpdyHeaderBlock::const_iterator BlockIt;
245 245
246 BlockIt status_it = header_block.find(kV3Status); 246 BlockIt status_it = header_block.find(kV3Status);
247 BlockIt version_it = header_block.find(kV3Version); 247 BlockIt version_it = header_block.find(kV3Version);
248 BlockIt end_it = header_block.end(); 248 BlockIt end_it = header_block.end();
249 if (status_it == end_it || version_it == end_it) { 249 if (status_it == end_it || version_it == end_it) {
250 return false; 250 return false;
251 } 251 }
252 252
253 request_headers->SetRequestVersion(version_it->second);
254 if (!ParseReasonAndStatus(status_it->second, request_headers)) { 253 if (!ParseReasonAndStatus(status_it->second, request_headers)) {
255 return false; 254 return false;
256 } 255 }
256 request_headers->SetResponseVersion(version_it->second);
257 for (BlockIt it = header_block.begin(); it != header_block.end(); ++it) { 257 for (BlockIt it = header_block.begin(); it != header_block.end(); ++it) {
258 if (!IsSpecialSpdyHeader(it, request_headers)) { 258 if (!IsSpecialSpdyHeader(it, request_headers)) {
259 request_headers->AppendHeader(it->first, it->second); 259 request_headers->AppendHeader(it->first, it->second);
260 } 260 }
261 } 261 }
262 return true; 262 return true;
263 } 263 }
264 264
265 } // namespace tools 265 } // namespace tools
266 } // namespace net 266 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698