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

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

Issue 11568033: Small fixes to allow unit tests to compile with gcc 4.7.x (tested with gcc 4.7.2) (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years 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
« no previous file with comments | « net/spdy/spdy_test_util_spdy2.h ('k') | net/spdy/spdy_test_util_spdy3.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_test_util_spdy2.h" 5 #include "net/spdy/spdy_test_util_spdy2.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 type, 313 type,
314 flags, 314 flags,
315 kHeaders, 315 kHeaders,
316 kHeadersSize, 316 kHeadersSize,
317 0); 317 0);
318 } 318 }
319 319
320 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[], 320 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[],
321 int extra_header_count, 321 int extra_header_count,
322 bool compressed, 322 bool compressed,
323 int stream_id, 323 SpdyStreamId stream_id,
324 RequestPriority request_priority, 324 RequestPriority request_priority,
325 SpdyControlType type, 325 SpdyControlType type,
326 SpdyControlFlags flags, 326 SpdyControlFlags flags,
327 const char* const* kHeaders, 327 const char* const* kHeaders,
328 int kHeadersSize, 328 int kHeadersSize,
329 int associated_stream_id) { 329 SpdyStreamId associated_stream_id) {
330 const SpdyHeaderInfo kSynStartHeader = { 330 const SpdyHeaderInfo kSynStartHeader = {
331 type, // Kind = Syn 331 type, // Kind = Syn
332 stream_id, // Stream ID 332 stream_id, // Stream ID
333 associated_stream_id, // Associated stream ID 333 associated_stream_id, // Associated stream ID
334 ConvertRequestPriorityToSpdyPriority(request_priority, 2), 334 ConvertRequestPriorityToSpdyPriority(request_priority, 2),
335 // Priority 335 // Priority
336 flags, // Control Flags 336 flags, // Control Flags
337 compressed, // Compressed 337 compressed, // Compressed
338 INVALID, // Status 338 INVALID, // Status
339 NULL, // Data 339 NULL, // Data
340 0, // Length 340 0, // Length
341 DATA_FLAG_NONE // Data Flags 341 DATA_FLAG_NONE // Data Flags
342 }; 342 };
343 return ConstructSpdyPacket(kSynStartHeader, 343 return ConstructSpdyPacket(kSynStartHeader,
344 extra_headers, 344 extra_headers,
345 extra_header_count, 345 extra_header_count,
346 kHeaders, 346 kHeaders,
347 kHeadersSize / 2); 347 kHeadersSize / 2);
348 } 348 }
349 349
350 // Constructs a standard SPDY GET SYN packet, optionally compressed 350 // Constructs a standard SPDY GET SYN packet, optionally compressed
351 // for the url |url|. 351 // for the url |url|.
352 // |extra_headers| are the extra header-value pairs, which typically 352 // |extra_headers| are the extra header-value pairs, which typically
353 // will vary the most between calls. 353 // will vary the most between calls.
354 // Returns a SpdyFrame. 354 // Returns a SpdyFrame.
355 SpdyFrame* ConstructSpdyGet(const char* const url, 355 SpdyFrame* ConstructSpdyGet(const char* const url,
356 bool compressed, 356 bool compressed,
357 int stream_id, 357 SpdyStreamId stream_id,
358 RequestPriority request_priority) { 358 RequestPriority request_priority) {
359 const SpdyHeaderInfo kSynStartHeader = { 359 const SpdyHeaderInfo kSynStartHeader = {
360 SYN_STREAM, // Kind = Syn 360 SYN_STREAM, // Kind = Syn
361 stream_id, // Stream ID 361 stream_id, // Stream ID
362 0, // Associated stream ID 362 0, // Associated stream ID
363 ConvertRequestPriorityToSpdyPriority(request_priority, 2), 363 ConvertRequestPriorityToSpdyPriority(request_priority, 2),
364 // Priority 364 // Priority
365 CONTROL_FLAG_FIN, // Control Flags 365 CONTROL_FLAG_FIN, // Control Flags
366 compressed, // Compressed 366 compressed, // Compressed
367 INVALID, // Status 367 INVALID, // Status
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 INVALID, // Status 978 INVALID, // Status
979 NULL, // Data 979 NULL, // Data
980 0, // Length 980 0, // Length
981 DATA_FLAG_NONE // Data Flags 981 DATA_FLAG_NONE // Data Flags
982 }; 982 };
983 return kHeader; 983 return kHeader;
984 } 984 }
985 985
986 } // namespace test_spdy2 986 } // namespace test_spdy2
987 } // namespace net 987 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_spdy2.h ('k') | net/spdy/spdy_test_util_spdy3.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698