Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1578)

Unified Diff: net/spdy/spdy_session_pool.cc

Issue 7827033: Introduce net::HttpServerPropertiesManager to manage server-specific properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698