OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 11 #include "net/base/host_port_pair.h" |
11 #include "net/base/mock_host_resolver.h" | 12 #include "net/base/mock_host_resolver.h" |
12 #include "net/base/request_priority.h" | 13 #include "net/base/request_priority.h" |
13 #include "net/base/ssl_config_service_defaults.h" | 14 #include "net/base/ssl_config_service_defaults.h" |
| 15 #include "net/base/sys_addrinfo.h" |
14 #include "net/http/http_auth_handler_factory.h" | 16 #include "net/http/http_auth_handler_factory.h" |
15 #include "net/http/http_cache.h" | 17 #include "net/http/http_cache.h" |
16 #include "net/http/http_network_session.h" | 18 #include "net/http/http_network_session.h" |
17 #include "net/http/http_network_layer.h" | 19 #include "net/http/http_network_layer.h" |
18 #include "net/http/http_transaction_factory.h" | 20 #include "net/http/http_transaction_factory.h" |
19 #include "net/proxy/proxy_service.h" | 21 #include "net/proxy/proxy_service.h" |
20 #include "net/socket/socket_test_util.h" | 22 #include "net/socket/socket_test_util.h" |
21 #include "net/spdy/spdy_framer.h" | 23 #include "net/spdy/spdy_framer.h" |
22 #include "net/url_request/url_request_context.h" | 24 #include "net/url_request/url_request_context.h" |
23 #include "net/url_request/url_request_context_storage.h" | 25 #include "net/url_request/url_request_context_storage.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 net::URLRequestContextStorage storage_; | 371 net::URLRequestContextStorage storage_; |
370 }; | 372 }; |
371 | 373 |
372 const SpdyHeaderInfo MakeSpdyHeader(spdy::SpdyControlType type); | 374 const SpdyHeaderInfo MakeSpdyHeader(spdy::SpdyControlType type); |
373 | 375 |
374 class SpdySessionPoolPeer { | 376 class SpdySessionPoolPeer { |
375 public: | 377 public: |
376 explicit SpdySessionPoolPeer(SpdySessionPool* pool) | 378 explicit SpdySessionPoolPeer(SpdySessionPool* pool) |
377 : pool_(pool) {} | 379 : pool_(pool) {} |
378 | 380 |
| 381 void AddAlias(const addrinfo* address, const HostPortProxyPair& pair) { |
| 382 pool_->AddAlias(address, pair); |
| 383 } |
| 384 |
379 void RemoveSpdySession(const scoped_refptr<SpdySession>& session) { | 385 void RemoveSpdySession(const scoped_refptr<SpdySession>& session) { |
380 pool_->Remove(session); | 386 pool_->Remove(session); |
381 } | 387 } |
382 | 388 |
383 void DisableDomainAuthenticationVerification() { | 389 void DisableDomainAuthenticationVerification() { |
384 pool_->verify_domain_authentication_ = false; | 390 pool_->verify_domain_authentication_ = false; |
385 } | 391 } |
386 | 392 |
387 private: | 393 private: |
388 SpdySessionPool* const pool_; | 394 SpdySessionPool* const pool_; |
389 | 395 |
390 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); | 396 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); |
391 }; | 397 }; |
392 | 398 |
393 } // namespace net | 399 } // namespace net |
394 | 400 |
395 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ | 401 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ |
OLD | NEW |