Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 SpdySerializedFrame into the given char array and returns |
| 94 // the total length. | 94 // the total length. |
|
Zhongyi Shi
2017/06/12 19:34:12
Could you update the comments since the return typ
Bence
2017/06/12 19:49:13
Oops, sorry about that. Good catch!
| |
| 95 int CombineFrames(const SpdySerializedFrame** frames, | 95 SpdySerializedFrame CombineFrames( |
| 96 int num_frames, | 96 std::vector<const SpdySerializedFrame*> frames); |
| 97 char* buf, | |
| 98 int buf_len); | |
| 99 | 97 |
| 100 // Returns the SpdyPriority embedded in the given frame. Returns true | 98 // Returns the SpdyPriority embedded in the given frame. Returns true |
| 101 // and fills in |priority| on success. | 99 // and fills in |priority| on success. |
| 102 bool GetSpdyPriority(const SpdySerializedFrame& frame, SpdyPriority* priority); | 100 bool GetSpdyPriority(const SpdySerializedFrame& frame, SpdyPriority* priority); |
| 103 | 101 |
| 104 // Tries to create a stream in |session| synchronously. Returns NULL | 102 // Tries to create a stream in |session| synchronously. Returns NULL |
| 105 // on failure. | 103 // on failure. |
| 106 base::WeakPtr<SpdyStream> CreateStreamSynchronously( | 104 base::WeakPtr<SpdyStream> CreateStreamSynchronously( |
| 107 SpdyStreamType type, | 105 SpdyStreamType type, |
| 108 const base::WeakPtr<SpdySession>& session, | 106 const base::WeakPtr<SpdySession>& session, |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 533 | 531 |
| 534 GURL default_url_; | 532 GURL default_url_; |
| 535 | 533 |
| 536 // Track a FIFO list of the stream_id of all created requests by priority. | 534 // 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_; | 535 std::map<int, std::vector<int>> priority_to_stream_id_list_; |
| 538 }; | 536 }; |
| 539 | 537 |
| 540 } // namespace net | 538 } // namespace net |
| 541 | 539 |
| 542 #endif // NET_SPDY_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_ | 540 #endif // NET_SPDY_CHROMIUM_SPDY_TEST_UTIL_COMMON_H_ |
| OLD | NEW |