| Index: net/spdy/spdy_test_util.h
|
| ===================================================================
|
| --- net/spdy/spdy_test_util.h (revision 92397)
|
| +++ net/spdy/spdy_test_util.h (working copy)
|
| @@ -7,15 +7,20 @@
|
| #pragma once
|
|
|
| #include "base/basictypes.h"
|
| +#include "net/base/address_list.h"
|
| #include "net/base/cert_verifier.h"
|
| +#include "net/base/host_port_pair.h"
|
| +#include "net/base/ip_endpoint.h"
|
| #include "net/base/mock_host_resolver.h"
|
| #include "net/base/request_priority.h"
|
| #include "net/base/ssl_config_service_defaults.h"
|
| +#include "net/base/sys_addrinfo.h"
|
| #include "net/http/http_auth_handler_factory.h"
|
| #include "net/http/http_cache.h"
|
| #include "net/http/http_network_session.h"
|
| #include "net/http/http_network_layer.h"
|
| #include "net/http/http_transaction_factory.h"
|
| +#include "net/proxy/proxy_server.h"
|
| #include "net/proxy/proxy_service.h"
|
| #include "net/socket/socket_test_util.h"
|
| #include "net/spdy/spdy_framer.h"
|
| @@ -376,6 +381,19 @@
|
| explicit SpdySessionPoolPeer(SpdySessionPool* pool)
|
| : pool_(pool) {}
|
|
|
| + void AddAliases(const net::HostPortProxyPair& pair) {
|
| + net::AddressList addresses;
|
| + if (!pool_->LookupAddresses(pair, &addresses))
|
| + return;
|
| + const addrinfo* address = addresses.head();
|
| + while (address) {
|
| + net::IPEndPoint endpoint;
|
| + endpoint.FromSockAddr(address->ai_addr, address->ai_addrlen);
|
| + pool_->AddAlias(endpoint, pair);
|
| + address = address->ai_next;
|
| + }
|
| + }
|
| +
|
| void RemoveSpdySession(const scoped_refptr<SpdySession>& session) {
|
| pool_->Remove(session);
|
| }
|
|
|