| 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 "crypto/ec_private_key.h" | 17 #include "crypto/ec_private_key.h" |
| 18 #include "crypto/ec_signature_creator.h" | 18 #include "crypto/ec_signature_creator.h" |
| 19 #include "net/base/completion_callback.h" | 19 #include "net/base/completion_callback.h" |
| 20 #include "net/base/proxy_delegate.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" |
| 27 #include "net/http/http_server_properties_impl.h" | 28 #include "net/http/http_server_properties_impl.h" |
| 28 #include "net/http/transport_security_state.h" | 29 #include "net/http/transport_security_state.h" |
| 30 #include "net/proxy/proxy_server.h" |
| 29 #include "net/proxy/proxy_service.h" | 31 #include "net/proxy/proxy_service.h" |
| 30 #include "net/socket/next_proto.h" | 32 #include "net/socket/next_proto.h" |
| 31 #include "net/socket/socket_test_util.h" | 33 #include "net/socket/socket_test_util.h" |
| 32 #include "net/spdy/spdy_protocol.h" | 34 #include "net/spdy/spdy_protocol.h" |
| 33 #include "net/ssl/ssl_config_service_defaults.h" | 35 #include "net/ssl/ssl_config_service_defaults.h" |
| 34 #include "net/url_request/url_request_context.h" | 36 #include "net/url_request/url_request_context.h" |
| 35 #include "net/url_request/url_request_context_storage.h" | 37 #include "net/url_request/url_request_context_storage.h" |
| 36 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
| 37 | 39 |
| 38 class GURL; | 40 class GURL; |
| 39 | 41 |
| 40 namespace net { | 42 namespace net { |
| 41 | 43 |
| 42 class BoundNetLog; | 44 class BoundNetLog; |
| 45 class HostPortPair; |
| 43 class SpdySession; | 46 class SpdySession; |
| 44 class SpdySessionKey; | 47 class SpdySessionKey; |
| 45 class SpdySessionPool; | 48 class SpdySessionPool; |
| 46 class SpdyStream; | 49 class SpdyStream; |
| 47 class SpdyStreamRequest; | 50 class SpdyStreamRequest; |
| 48 | 51 |
| 49 // Default upload data used by both, mock objects and framer when creating | 52 // Default upload data used by both, mock objects and framer when creating |
| 50 // data frames. | 53 // data frames. |
| 51 const char kDefaultURL[] = "http://www.example.org/"; | 54 const char kDefaultURL[] = "http://www.example.org/"; |
| 52 const char kUploadData[] = "hello!"; | 55 const char kUploadData[] = "hello!"; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 bool enable_compression; | 198 bool enable_compression; |
| 196 bool enable_ping; | 199 bool enable_ping; |
| 197 bool enable_user_alternate_protocol_ports; | 200 bool enable_user_alternate_protocol_ports; |
| 198 bool enable_npn; | 201 bool enable_npn; |
| 199 NextProto protocol; | 202 NextProto protocol; |
| 200 size_t session_max_recv_window_size; | 203 size_t session_max_recv_window_size; |
| 201 size_t stream_max_recv_window_size; | 204 size_t stream_max_recv_window_size; |
| 202 SpdySession::TimeFunc time_func; | 205 SpdySession::TimeFunc time_func; |
| 203 bool enable_spdy31; | 206 bool enable_spdy31; |
| 204 bool enable_http2; | 207 bool enable_http2; |
| 205 std::string trusted_spdy_proxy; | 208 scoped_ptr<ProxyDelegate> proxy_delegate; |
| 206 bool parse_alternative_services; | 209 bool parse_alternative_services; |
| 207 bool enable_alternative_service_with_different_host; | 210 bool enable_alternative_service_with_different_host; |
| 208 NetLog* net_log; | 211 NetLog* net_log; |
| 209 }; | 212 }; |
| 210 | 213 |
| 211 class SpdyURLRequestContext : public URLRequestContext { | 214 class SpdyURLRequestContext : public URLRequestContext { |
| 212 public: | 215 public: |
| 213 explicit SpdyURLRequestContext(NextProto protocol); | 216 explicit SpdyURLRequestContext(NextProto protocol); |
| 214 ~SpdyURLRequestContext() override; | 217 ~SpdyURLRequestContext() override; |
| 215 | 218 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 GURL default_url_; | 581 GURL default_url_; |
| 579 bool dependency_priorities_; | 582 bool dependency_priorities_; |
| 580 | 583 |
| 581 // 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. |
| 582 std::map<int, std::vector<int>> priority_to_stream_id_list_; | 585 std::map<int, std::vector<int>> priority_to_stream_id_list_; |
| 583 }; | 586 }; |
| 584 | 587 |
| 585 } // namespace net | 588 } // namespace net |
| 586 | 589 |
| 587 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 590 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| OLD | NEW |