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

Side by Side Diff: net/spdy/spdy_test_util.h

Issue 9425016: Change MockRead and MockWrite (et. al.) to take an IoMode enum, instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 8 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/spdy/spdy_test_util.cc » ('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 #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
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
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_
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/spdy/spdy_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698