| Index: net/spdy/spdy_session_pool.cc
|
| ===================================================================
|
| --- net/spdy/spdy_session_pool.cc (revision 99284)
|
| +++ net/spdy/spdy_session_pool.cc (working copy)
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/metrics/histogram.h"
|
| +#include "base/stringprintf.h"
|
| #include "base/values.h"
|
| #include "net/base/address_list.h"
|
| #include "net/base/sys_addrinfo.h"
|
| @@ -40,8 +41,10 @@
|
| bool SpdySessionPool::g_enable_ip_pooling = true;
|
|
|
| SpdySessionPool::SpdySessionPool(HostResolver* resolver,
|
| + SpdyConfigService* spdy_config_service,
|
| SSLConfigService* ssl_config_service)
|
| - : ssl_config_service_(ssl_config_service),
|
| + : spdy_config_service_(spdy_config_service),
|
| + ssl_config_service_(ssl_config_service),
|
| resolver_(resolver),
|
| verify_domain_authentication_(true) {
|
| NetworkChangeNotifier::AddIPAddressObserver(this);
|
| @@ -356,6 +359,17 @@
|
| IPEndPoint endpoint;
|
| endpoint.FromSockAddr(address->ai_addr, address->ai_addrlen);
|
| aliases_[endpoint] = pair;
|
| +
|
| + // Walk the aliases map and persist the spdy server names.
|
| + if (spdy_config_service_) {
|
| + std::string spdy_server;
|
| + const HostPortPair& host_port_pair = pair.first;
|
| + spdy_server.append(host_port_pair.host());
|
| + spdy_server.append(":");
|
| + base::StringAppendF(&spdy_server, "%d", host_port_pair.port());
|
| + spdy_server.append(";");
|
| + spdy_config_service_->AddSpdyServer(spdy_server);
|
| + }
|
| }
|
|
|
| void SpdySessionPool::RemoveAliases(const HostPortProxyPair& pair) {
|
|
|