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

Side by Side Diff: net/spdy/chromium/spdy_test_util_common.h

Issue 2936663002: Simplify CombineFrames() interface. (Closed)
Patch Set: Re: #7. Created 3 years, 6 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
« no previous file with comments | « net/spdy/chromium/spdy_session_unittest.cc ('k') | net/spdy/chromium/spdy_test_util_common.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_ 5 #ifndef NET_SPDY_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_
6 #define NET_SPDY_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_ 6 #define NET_SPDY_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 MockWrite CreateMockWrite(const SpdySerializedFrame& req, int seq, IoMode mode); 83 MockWrite CreateMockWrite(const SpdySerializedFrame& req, int seq, IoMode mode);
84 84
85 // Create a MockRead from the given SpdySerializedFrame. 85 // Create a MockRead from the given SpdySerializedFrame.
86 MockRead CreateMockRead(const SpdySerializedFrame& resp); 86 MockRead CreateMockRead(const SpdySerializedFrame& resp);
87 87
88 // Create a MockRead from the given SpdySerializedFrame and sequence number. 88 // Create a MockRead from the given SpdySerializedFrame and sequence number.
89 MockRead CreateMockRead(const SpdySerializedFrame& resp, int seq); 89 MockRead CreateMockRead(const SpdySerializedFrame& resp, int seq);
90 90
91 MockRead CreateMockRead(const SpdySerializedFrame& resp, int seq, IoMode mode); 91 MockRead CreateMockRead(const SpdySerializedFrame& resp, int seq, IoMode mode);
92 92
93 // Combines the given SpdySerializedFrame into the given char array and returns 93 // Combines the given vector of SpdySerializedFrame into a single frame.
94 // the total length. 94 SpdySerializedFrame CombineFrames(
95 int CombineFrames(const SpdySerializedFrame** frames, 95 std::vector<const SpdySerializedFrame*> frames);
96 int num_frames,
97 char* buf,
98 int buf_len);
99 96
100 // Returns the SpdyPriority embedded in the given frame. Returns true 97 // Returns the SpdyPriority embedded in the given frame. Returns true
101 // and fills in |priority| on success. 98 // and fills in |priority| on success.
102 bool GetSpdyPriority(const SpdySerializedFrame& frame, SpdyPriority* priority); 99 bool GetSpdyPriority(const SpdySerializedFrame& frame, SpdyPriority* priority);
103 100
104 // Tries to create a stream in |session| synchronously. Returns NULL 101 // Tries to create a stream in |session| synchronously. Returns NULL
105 // on failure. 102 // on failure.
106 base::WeakPtr<SpdyStream> CreateStreamSynchronously( 103 base::WeakPtr<SpdyStream> CreateStreamSynchronously(
107 SpdyStreamType type, 104 SpdyStreamType type,
108 const base::WeakPtr<SpdySession>& session, 105 const base::WeakPtr<SpdySession>& session,
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 530
534 GURL default_url_; 531 GURL default_url_;
535 532
536 // Track a FIFO list of the stream_id of all created requests by priority. 533 // Track a FIFO list of the stream_id of all created requests by priority.
537 std::map<int, std::vector<int>> priority_to_stream_id_list_; 534 std::map<int, std::vector<int>> priority_to_stream_id_list_;
538 }; 535 };
539 536
540 } // namespace net 537 } // namespace net
541 538
542 #endif // NET_SPDY_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_ 539 #endif // NET_SPDY_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_
OLDNEW
« no previous file with comments | « net/spdy/chromium/spdy_session_unittest.cc ('k') | net/spdy/chromium/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698