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

Side by Side Diff: net/spdy/spdy_test_util_spdy3.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
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_spdy3.h" 5 #include "net/spdy/spdy_test_util_spdy3.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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 type, 358 type,
359 flags, 359 flags,
360 kHeaders, 360 kHeaders,
361 kHeadersSize, 361 kHeadersSize,
362 0); 362 0);
363 } 363 }
364 364
365 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[], 365 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[],
366 int extra_header_count, 366 int extra_header_count,
367 bool compressed, 367 bool compressed,
368 int stream_id, 368 SpdyStreamId stream_id,
369 RequestPriority request_priority, 369 RequestPriority request_priority,
370 SpdyControlType type, 370 SpdyControlType type,
371 SpdyControlFlags flags, 371 SpdyControlFlags flags,
372 const char* const* kHeaders, 372 const char* const* kHeaders,
373 int kHeadersSize, 373 int kHeadersSize,
374 int associated_stream_id) { 374 SpdyStreamId associated_stream_id) {
375 const SpdyHeaderInfo kSynStartHeader = { 375 const SpdyHeaderInfo kSynStartHeader = {
376 type, // Kind = Syn 376 type, // Kind = Syn
377 stream_id, // Stream ID 377 stream_id, // Stream ID
378 associated_stream_id, // Associated stream ID 378 associated_stream_id, // Associated stream ID
379 ConvertRequestPriorityToSpdyPriority(request_priority, 3), 379 ConvertRequestPriorityToSpdyPriority(request_priority, 3),
380 // Priority 380 // Priority
381 0, // Credential Slot 381 0, // Credential Slot
382 flags, // Control Flags 382 flags, // Control Flags
383 compressed, // Compressed 383 compressed, // Compressed
384 INVALID, // Status 384 INVALID, // Status
385 NULL, // Data 385 NULL, // Data
386 0, // Length 386 0, // Length
387 DATA_FLAG_NONE // Data Flags 387 DATA_FLAG_NONE // Data Flags
388 }; 388 };
389 return ConstructSpdyPacket(kSynStartHeader, 389 return ConstructSpdyPacket(kSynStartHeader,
390 extra_headers, 390 extra_headers,
391 extra_header_count, 391 extra_header_count,
392 kHeaders, 392 kHeaders,
393 kHeadersSize / 2); 393 kHeadersSize / 2);
394 } 394 }
395 395
396 // Constructs a standard SPDY GET SYN packet, optionally compressed 396 // Constructs a standard SPDY GET SYN packet, optionally compressed
397 // for the url |url|. 397 // for the url |url|.
398 // |extra_headers| are the extra header-value pairs, which typically 398 // |extra_headers| are the extra header-value pairs, which typically
399 // will vary the most between calls. 399 // will vary the most between calls.
400 // Returns a SpdyFrame. 400 // Returns a SpdyFrame.
401 SpdyFrame* ConstructSpdyGet(const char* const url, 401 SpdyFrame* ConstructSpdyGet(const char* const url,
402 bool compressed, 402 bool compressed,
403 int stream_id, 403 SpdyStreamId stream_id,
404 RequestPriority request_priority) { 404 RequestPriority request_priority) {
405 const SpdyHeaderInfo kSynStartHeader = { 405 const SpdyHeaderInfo kSynStartHeader = {
406 SYN_STREAM, // Kind = Syn 406 SYN_STREAM, // Kind = Syn
407 stream_id, // Stream ID 407 stream_id, // Stream ID
408 0, // Associated stream ID 408 0, // Associated stream ID
409 ConvertRequestPriorityToSpdyPriority(request_priority, 3), 409 ConvertRequestPriorityToSpdyPriority(request_priority, 3),
410 // Priority 410 // Priority
411 0, // Credential Slot 411 0, // Credential Slot
412 CONTROL_FLAG_FIN, // Control Flags 412 CONTROL_FLAG_FIN, // Control Flags
413 compressed, // Compressed 413 compressed, // Compressed
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 NULL, // Data 1024 NULL, // Data
1025 0, // Length 1025 0, // Length
1026 DATA_FLAG_NONE // Data Flags 1026 DATA_FLAG_NONE // Data Flags
1027 }; 1027 };
1028 return kHeader; 1028 return kHeader;
1029 } 1029 }
1030 1030
1031 } // namespace test_spdy3 1031 } // namespace test_spdy3
1032 1032
1033 } // namespace net 1033 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_spdy3.h ('k') | sync/internal_api/sync_encryption_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698