| 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 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ |
| 6 #define NET_SPDY_SPDY_TEST_UTIL_H_ | 6 #define NET_SPDY_SPDY_TEST_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "net/base/cert_verifier.h" | 10 #include "net/base/cert_verifier.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 // Wraps |frame| in the payload of a data frame in stream |stream_id|. | 320 // Wraps |frame| in the payload of a data frame in stream |stream_id|. |
| 321 spdy::SpdyFrame* ConstructWrappedSpdyFrame( | 321 spdy::SpdyFrame* ConstructWrappedSpdyFrame( |
| 322 const scoped_ptr<spdy::SpdyFrame>& frame, int stream_id); | 322 const scoped_ptr<spdy::SpdyFrame>& frame, int stream_id); |
| 323 | 323 |
| 324 // Create an async MockWrite from the given SpdyFrame. | 324 // Create an async MockWrite from the given SpdyFrame. |
| 325 MockWrite CreateMockWrite(const spdy::SpdyFrame& req); | 325 MockWrite CreateMockWrite(const spdy::SpdyFrame& req); |
| 326 | 326 |
| 327 // Create an async MockWrite from the given SpdyFrame and sequence number. | 327 // Create an async MockWrite from the given SpdyFrame and sequence number. |
| 328 MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq); | 328 MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq); |
| 329 | 329 |
| 330 MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq, bool async); | 330 MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq, IoMode mode); |
| 331 | 331 |
| 332 // Create a MockRead from the given SpdyFrame. | 332 // Create a MockRead from the given SpdyFrame. |
| 333 MockRead CreateMockRead(const spdy::SpdyFrame& resp); | 333 MockRead CreateMockRead(const spdy::SpdyFrame& resp); |
| 334 | 334 |
| 335 // Create a MockRead from the given SpdyFrame and sequence number. | 335 // Create a MockRead from the given SpdyFrame and sequence number. |
| 336 MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq); | 336 MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq); |
| 337 | 337 |
| 338 MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq, bool async); | 338 MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq, IoMode mode); |
| 339 | 339 |
| 340 // Combines the given SpdyFrames into the given char array and returns | 340 // Combines the given SpdyFrames into the given char array and returns |
| 341 // the total length. | 341 // the total length. |
| 342 int CombineFrames(const spdy::SpdyFrame** frames, int num_frames, | 342 int CombineFrames(const spdy::SpdyFrame** frames, int num_frames, |
| 343 char* buff, int buff_len); | 343 char* buff, int buff_len); |
| 344 | 344 |
| 345 // Helper to manage the lifetimes of the dependencies for a | 345 // Helper to manage the lifetimes of the dependencies for a |
| 346 // HttpNetworkTransaction. | 346 // HttpNetworkTransaction. |
| 347 class SpdySessionDependencies { | 347 class SpdySessionDependencies { |
| 348 public: | 348 public: |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 405 |
| 406 private: | 406 private: |
| 407 SpdySessionPool* const pool_; | 407 SpdySessionPool* const pool_; |
| 408 | 408 |
| 409 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); | 409 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); |
| 410 }; | 410 }; |
| 411 | 411 |
| 412 } // namespace net | 412 } // namespace net |
| 413 | 413 |
| 414 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ | 414 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ |
| OLD | NEW |