| 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_SPDY_TEST_UTIL_COMMON_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| 6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 6 #define NET_SPDY_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 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" |
| 17 #include "crypto/ec_private_key.h" | 18 #include "crypto/ec_private_key.h" |
| 18 #include "crypto/ec_signature_creator.h" | 19 #include "crypto/ec_signature_creator.h" |
| 19 #include "net/base/completion_callback.h" | 20 #include "net/base/completion_callback.h" |
| 20 #include "net/base/request_priority.h" | 21 #include "net/base/request_priority.h" |
| 21 #include "net/base/test_completion_callback.h" | 22 #include "net/base/test_completion_callback.h" |
| 22 #include "net/cert/cert_verifier.h" | 23 #include "net/cert/cert_verifier.h" |
| 23 #include "net/dns/mock_host_resolver.h" | 24 #include "net/dns/mock_host_resolver.h" |
| 24 #include "net/http/http_auth_handler_factory.h" | 25 #include "net/http/http_auth_handler_factory.h" |
| 25 #include "net/http/http_network_session.h" | 26 #include "net/http/http_network_session.h" |
| 26 #include "net/http/http_response_info.h" | 27 #include "net/http/http_response_info.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 38 class GURL; | 39 class GURL; |
| 39 | 40 |
| 40 namespace net { | 41 namespace net { |
| 41 | 42 |
| 42 class BoundNetLog; | 43 class BoundNetLog; |
| 43 class SpdySession; | 44 class SpdySession; |
| 44 class SpdySessionKey; | 45 class SpdySessionKey; |
| 45 class SpdySessionPool; | 46 class SpdySessionPool; |
| 46 class SpdyStream; | 47 class SpdyStream; |
| 47 class SpdyStreamRequest; | 48 class SpdyStreamRequest; |
| 49 class TrustedSpdyProxyProvider; |
| 48 | 50 |
| 49 // Default upload data used by both, mock objects and framer when creating | 51 // Default upload data used by both, mock objects and framer when creating |
| 50 // data frames. | 52 // data frames. |
| 51 const char kDefaultURL[] = "http://www.example.org/"; | 53 const char kDefaultURL[] = "http://www.example.org/"; |
| 52 const char kUploadData[] = "hello!"; | 54 const char kUploadData[] = "hello!"; |
| 53 const int kUploadDataSize = arraysize(kUploadData)-1; | 55 const int kUploadDataSize = arraysize(kUploadData)-1; |
| 54 | 56 |
| 55 // SpdyNextProtos returns a vector of next protocols for negotiating | 57 // SpdyNextProtos returns a vector of next protocols for negotiating |
| 56 // SPDY. | 58 // SPDY. |
| 57 NextProtoVector SpdyNextProtos(); | 59 NextProtoVector SpdyNextProtos(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 bool enable_ip_pooling; | 199 bool enable_ip_pooling; |
| 198 bool enable_compression; | 200 bool enable_compression; |
| 199 bool enable_ping; | 201 bool enable_ping; |
| 200 bool enable_user_alternate_protocol_ports; | 202 bool enable_user_alternate_protocol_ports; |
| 201 bool enable_npn; | 203 bool enable_npn; |
| 202 NextProto protocol; | 204 NextProto protocol; |
| 203 size_t session_max_recv_window_size; | 205 size_t session_max_recv_window_size; |
| 204 size_t stream_max_recv_window_size; | 206 size_t stream_max_recv_window_size; |
| 205 SpdySession::TimeFunc time_func; | 207 SpdySession::TimeFunc time_func; |
| 206 NextProtoVector next_protos; | 208 NextProtoVector next_protos; |
| 207 std::string trusted_spdy_proxy; | 209 base::WeakPtr<TrustedSpdyProxyProvider> trusted_spdy_proxy_provider; |
| 208 bool use_alternative_services; | 210 bool use_alternative_services; |
| 209 NetLog* net_log; | 211 NetLog* net_log; |
| 210 }; | 212 }; |
| 211 | 213 |
| 212 class SpdyURLRequestContext : public URLRequestContext { | 214 class SpdyURLRequestContext : public URLRequestContext { |
| 213 public: | 215 public: |
| 214 explicit SpdyURLRequestContext(NextProto protocol); | 216 explicit SpdyURLRequestContext(NextProto protocol); |
| 215 ~SpdyURLRequestContext() override; | 217 ~SpdyURLRequestContext() override; |
| 216 | 218 |
| 217 MockClientSocketFactory& socket_factory() { return socket_factory_; } | 219 MockClientSocketFactory& socket_factory() { return socket_factory_; } |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 GURL default_url_; | 581 GURL default_url_; |
| 580 bool dependency_priorities_; | 582 bool dependency_priorities_; |
| 581 | 583 |
| 582 // Track a FIFO list of the stream_id of all created requests by priority. | 584 // Track a FIFO list of the stream_id of all created requests by priority. |
| 583 std::map<int, std::vector<int>> priority_to_stream_id_list_; | 585 std::map<int, std::vector<int>> priority_to_stream_id_list_; |
| 584 }; | 586 }; |
| 585 | 587 |
| 586 } // namespace net | 588 } // namespace net |
| 587 | 589 |
| 588 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 590 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| OLD | NEW |