Commit fc3ff06f authored by thakis@chromium.org's avatar thakis@chromium.org

Revert 113315 (speculative revert for http://crbug.com/106657)

- Save pipelining capabilities for the most used hosts between sessions.

BUG=None
TEST=unit_tests


Review URL: http://codereview.chromium.org/8770035

TBR=simonjam@chromium.org
Review URL: http://codereview.chromium.org/8833003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113338 0039d316-1c4b-4281-b951-d872f2087c98
parent 14153a2e
...@@ -181,12 +181,12 @@ class MRUCacheBase { ...@@ -181,12 +181,12 @@ class MRUCacheBase {
// can keep them as you insert or delete things (as long as you don't delete // can keep them as you insert or delete things (as long as you don't delete
// the one you are pointing to) and they will still be valid. // the one you are pointing to) and they will still be valid.
iterator begin() { return ordering_.begin(); } iterator begin() { return ordering_.begin(); }
const_iterator begin() const { return ordering_.begin(); } const_iterator begin() const { ordering_.begin(); }
iterator end() { return ordering_.end(); } iterator end() { return ordering_.end(); }
const_iterator end() const { return ordering_.end(); } const_iterator end() const { return ordering_.end(); }
reverse_iterator rbegin() { return ordering_.rbegin(); } reverse_iterator rbegin() { return ordering_.rbegin(); }
const_reverse_iterator rbegin() const { return ordering_.rbegin(); } const_reverse_iterator rbegin() const { ordering_.rbegin(); }
reverse_iterator rend() { return ordering_.rend(); } reverse_iterator rend() { return ordering_.rend(); }
const_reverse_iterator rend() const { return ordering_.rend(); } const_reverse_iterator rend() const { return ordering_.rend(); }
......
...@@ -171,33 +171,6 @@ HttpServerPropertiesManager::spdy_settings_map() const { ...@@ -171,33 +171,6 @@ HttpServerPropertiesManager::spdy_settings_map() const {
return http_server_properties_impl_->spdy_settings_map(); return http_server_properties_impl_->spdy_settings_map();
} }
net::HttpPipelinedHostCapability
HttpServerPropertiesManager::GetPipelineCapability(
const net::HostPortPair& origin) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return http_server_properties_impl_->GetPipelineCapability(origin);
}
void HttpServerPropertiesManager::SetPipelineCapability(
const net::HostPortPair& origin,
net::HttpPipelinedHostCapability capability) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
http_server_properties_impl_->SetPipelineCapability(origin, capability);
ScheduleUpdatePrefsOnIO();
}
void HttpServerPropertiesManager::ClearPipelineCapabilities() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
http_server_properties_impl_->ClearPipelineCapabilities();
ScheduleUpdatePrefsOnIO();
}
net::PipelineCapabilityMap
HttpServerPropertiesManager::GetPipelineCapabilityMap() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return http_server_properties_impl_->GetPipelineCapabilityMap();
}
// //
// Update the HttpServerPropertiesImpl's cache with data from preferences. // Update the HttpServerPropertiesImpl's cache with data from preferences.
// //
...@@ -234,9 +207,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() { ...@@ -234,9 +207,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
net::AlternateProtocolMap* alternate_protocol_map = net::AlternateProtocolMap* alternate_protocol_map =
new net::AlternateProtocolMap; new net::AlternateProtocolMap;
net::PipelineCapabilityMap* pipeline_capability_map =
new net::PipelineCapabilityMap;
const base::DictionaryValue& http_server_properties_dict = const base::DictionaryValue& http_server_properties_dict =
*pref_service_->GetDictionary(prefs::kHttpServerProperties); *pref_service_->GetDictionary(prefs::kHttpServerProperties);
for (base::DictionaryValue::key_iterator it = for (base::DictionaryValue::key_iterator it =
...@@ -311,14 +281,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() { ...@@ -311,14 +281,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
(*spdy_settings_map)[server] = spdy_settings; (*spdy_settings_map)[server] = spdy_settings;
} }
int pipeline_capability = net::PIPELINE_UNKNOWN;
if ((server_pref_dict->GetInteger(
"pipeline_capability", &pipeline_capability)) &&
pipeline_capability != net::PIPELINE_UNKNOWN) {
(*pipeline_capability_map)[server] =
static_cast<net::HttpPipelinedHostCapability>(pipeline_capability);
}
// Get alternate_protocol server. // Get alternate_protocol server.
DCHECK(!ContainsKey(*alternate_protocol_map, server)); DCHECK(!ContainsKey(*alternate_protocol_map, server));
base::DictionaryValue* port_alternate_protocol_dict = NULL; base::DictionaryValue* port_alternate_protocol_dict = NULL;
...@@ -361,15 +323,13 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() { ...@@ -361,15 +323,13 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
base::Unretained(this), base::Unretained(this),
base::Owned(spdy_servers), base::Owned(spdy_servers),
base::Owned(spdy_settings_map), base::Owned(spdy_settings_map),
base::Owned(alternate_protocol_map), base::Owned(alternate_protocol_map)));
base::Owned(pipeline_capability_map)));
} }
void HttpServerPropertiesManager::UpdateCacheFromPrefsOnIO( void HttpServerPropertiesManager::UpdateCacheFromPrefsOnIO(
StringVector* spdy_servers, StringVector* spdy_servers,
net::SpdySettingsMap* spdy_settings_map, net::SpdySettingsMap* spdy_settings_map,
net::AlternateProtocolMap* alternate_protocol_map, net::AlternateProtocolMap* alternate_protocol_map) {
net::PipelineCapabilityMap* pipeline_capability_map) {
// Preferences have the master data because admins might have pushed new // Preferences have the master data because admins might have pushed new
// preferences. Update the cached data with new data from preferences. // preferences. Update the cached data with new data from preferences.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
...@@ -384,9 +344,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnIO( ...@@ -384,9 +344,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnIO(
// preferences. // preferences.
http_server_properties_impl_->InitializeAlternateProtocolServers( http_server_properties_impl_->InitializeAlternateProtocolServers(
alternate_protocol_map); alternate_protocol_map);
http_server_properties_impl_->InitializePipelineCapabilities(
pipeline_capability_map);
} }
...@@ -424,11 +381,6 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnIO() { ...@@ -424,11 +381,6 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnIO() {
*alternate_protocol_map = *alternate_protocol_map =
http_server_properties_impl_->alternate_protocol_map(); http_server_properties_impl_->alternate_protocol_map();
net::PipelineCapabilityMap* pipeline_capability_map =
new net::PipelineCapabilityMap;
*pipeline_capability_map =
http_server_properties_impl_->GetPipelineCapabilityMap();
// Update the preferences on the UI thread. // Update the preferences on the UI thread.
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::UI, BrowserThread::UI,
...@@ -437,39 +389,34 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnIO() { ...@@ -437,39 +389,34 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnIO() {
ui_weak_ptr_, ui_weak_ptr_,
base::Owned(spdy_server_list), base::Owned(spdy_server_list),
base::Owned(spdy_settings_map), base::Owned(spdy_settings_map),
base::Owned(alternate_protocol_map), base::Owned(alternate_protocol_map)));
base::Owned(pipeline_capability_map)));
} }
// A local or temporary data structure to hold |supports_spdy|, SpdySettings, // A local or temporary data structure to hold supports_spdy, SpdySettings and
// PortAlternateProtocolPair, and |pipeline_capability| preferences for a // PortAlternateProtocolPair preferences for a server. This is used only in
// server. This is used only in UpdatePrefsOnUI. // UpdatePrefsOnUI.
struct ServerPref { struct ServerPref {
ServerPref() ServerPref()
: supports_spdy(false), : supports_spdy(false),
settings(NULL), settings(NULL),
alternate_protocol(NULL), alternate_protocol(NULL) {
pipeline_capability(net::PIPELINE_UNKNOWN) {
} }
ServerPref(bool supports_spdy, ServerPref(bool supports_spdy,
const spdy::SpdySettings* settings, const spdy::SpdySettings* settings,
const net::PortAlternateProtocolPair* alternate_protocol) const net::PortAlternateProtocolPair* alternate_protocol)
: supports_spdy(supports_spdy), : supports_spdy(supports_spdy),
settings(settings), settings(settings),
alternate_protocol(alternate_protocol), alternate_protocol(alternate_protocol) {
pipeline_capability(net::PIPELINE_UNKNOWN) {
} }
bool supports_spdy; bool supports_spdy;
const spdy::SpdySettings* settings; const spdy::SpdySettings* settings;
const net::PortAlternateProtocolPair* alternate_protocol; const net::PortAlternateProtocolPair* alternate_protocol;
net::HttpPipelinedHostCapability pipeline_capability;
}; };
void HttpServerPropertiesManager::UpdatePrefsOnUI( void HttpServerPropertiesManager::UpdatePrefsOnUI(
base::ListValue* spdy_server_list, base::ListValue* spdy_server_list,
net::SpdySettingsMap* spdy_settings_map, net::SpdySettingsMap* spdy_settings_map,
net::AlternateProtocolMap* alternate_protocol_map, net::AlternateProtocolMap* alternate_protocol_map) {
net::PipelineCapabilityMap* pipeline_capability_map) {
typedef std::map<net::HostPortPair, ServerPref> ServerPrefMap; typedef std::map<net::HostPortPair, ServerPref> ServerPrefMap;
ServerPrefMap server_pref_map; ServerPrefMap server_pref_map;
...@@ -529,23 +476,6 @@ void HttpServerPropertiesManager::UpdatePrefsOnUI( ...@@ -529,23 +476,6 @@ void HttpServerPropertiesManager::UpdatePrefsOnUI(
} }
} }
for (net::PipelineCapabilityMap::const_iterator map_it =
pipeline_capability_map->begin();
map_it != pipeline_capability_map->end(); ++map_it) {
const net::HostPortPair& server = map_it->first;
const net::HttpPipelinedHostCapability& pipeline_capability =
map_it->second;
ServerPrefMap::iterator it = server_pref_map.find(server);
if (it == server_pref_map.end()) {
ServerPref server_pref;
server_pref.pipeline_capability = pipeline_capability;
server_pref_map[server] = server_pref;
} else {
it->second.pipeline_capability = pipeline_capability;
}
}
// Persist the prefs::kHttpServerProperties. // Persist the prefs::kHttpServerProperties.
base::DictionaryValue http_server_properties_dict; base::DictionaryValue http_server_properties_dict;
for (ServerPrefMap::const_iterator map_it = for (ServerPrefMap::const_iterator map_it =
...@@ -588,14 +518,8 @@ void HttpServerPropertiesManager::UpdatePrefsOnUI( ...@@ -588,14 +518,8 @@ void HttpServerPropertiesManager::UpdatePrefsOnUI(
server_pref_dict->SetWithoutPathExpansion( server_pref_dict->SetWithoutPathExpansion(
"alternate_protocol", port_alternate_protocol_dict); "alternate_protocol", port_alternate_protocol_dict);
} }
http_server_properties_dict.SetWithoutPathExpansion(
if (server_pref.pipeline_capability != net::PIPELINE_UNKNOWN) { server.ToString(), server_pref_dict);
server_pref_dict->SetInteger("pipeline_capability",
server_pref.pipeline_capability);
}
http_server_properties_dict.SetWithoutPathExpansion(server.ToString(),
server_pref_dict);
} }
setting_prefs_ = true; setting_prefs_ = true;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/prefs/pref_change_registrar.h"
#include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_observer.h"
#include "net/base/host_port_pair.h" #include "net/base/host_port_pair.h"
#include "net/http/http_pipelined_host_capability.h"
#include "net/http/http_server_properties.h" #include "net/http/http_server_properties.h"
#include "net/http/http_server_properties_impl.h" #include "net/http/http_server_properties_impl.h"
...@@ -123,17 +122,6 @@ class HttpServerPropertiesManager ...@@ -123,17 +122,6 @@ class HttpServerPropertiesManager
// Returns all SpdySettings mappings. // Returns all SpdySettings mappings.
virtual const net::SpdySettingsMap& spdy_settings_map() const OVERRIDE; virtual const net::SpdySettingsMap& spdy_settings_map() const OVERRIDE;
virtual net::HttpPipelinedHostCapability GetPipelineCapability(
const net::HostPortPair& origin) OVERRIDE;
virtual void SetPipelineCapability(
const net::HostPortPair& origin,
net::HttpPipelinedHostCapability capability) OVERRIDE;
virtual void ClearPipelineCapabilities() OVERRIDE;
virtual net::PipelineCapabilityMap GetPipelineCapabilityMap() const OVERRIDE;
protected: protected:
// -------------------- // --------------------
// SPDY related methods // SPDY related methods
...@@ -157,8 +145,7 @@ class HttpServerPropertiesManager ...@@ -157,8 +145,7 @@ class HttpServerPropertiesManager
void UpdateCacheFromPrefsOnIO( void UpdateCacheFromPrefsOnIO(
std::vector<std::string>* spdy_servers, std::vector<std::string>* spdy_servers,
net::SpdySettingsMap* spdy_settings_map, net::SpdySettingsMap* spdy_settings_map,
net::AlternateProtocolMap* alternate_protocol_map, net::AlternateProtocolMap* alternate_protocol_map);
net::PipelineCapabilityMap* pipeline_capability_map);
// These are used to delay updating the preferences when cached data in // These are used to delay updating the preferences when cached data in
// |http_server_properties_impl_| is changing, and execute only one update per // |http_server_properties_impl_| is changing, and execute only one update per
...@@ -180,8 +167,7 @@ class HttpServerPropertiesManager ...@@ -180,8 +167,7 @@ class HttpServerPropertiesManager
void UpdatePrefsOnUI( void UpdatePrefsOnUI(
base::ListValue* spdy_server_list, base::ListValue* spdy_server_list,
net::SpdySettingsMap* spdy_settings_map, net::SpdySettingsMap* spdy_settings_map,
net::AlternateProtocolMap* alternate_protocol_map, net::AlternateProtocolMap* alternate_protocol_map);
net::PipelineCapabilityMap* pipeline_capability_map);
private: private:
// Callback for preference changes. // Callback for preference changes.
......
...@@ -60,16 +60,14 @@ class TestingHttpServerPropertiesManager : public HttpServerPropertiesManager { ...@@ -60,16 +60,14 @@ class TestingHttpServerPropertiesManager : public HttpServerPropertiesManager {
MOCK_METHOD0(UpdateCacheFromPrefsOnUI, void()); MOCK_METHOD0(UpdateCacheFromPrefsOnUI, void());
MOCK_METHOD0(UpdatePrefsFromCacheOnIO, void()); MOCK_METHOD0(UpdatePrefsFromCacheOnIO, void());
MOCK_METHOD4(UpdateCacheFromPrefsOnIO, MOCK_METHOD3(UpdateCacheFromPrefsOnIO,
void(std::vector<std::string>* spdy_servers, void(std::vector<std::string>* spdy_servers,
net::SpdySettingsMap* spdy_settings_map, net::SpdySettingsMap* spdy_settings_map,
net::AlternateProtocolMap* alternate_protocol_map, net::AlternateProtocolMap* alternate_protocol_map));
net::PipelineCapabilityMap* pipeline_capability_map)); MOCK_METHOD3(UpdatePrefsOnUI,
MOCK_METHOD4(UpdatePrefsOnUI,
void(base::ListValue* spdy_server_list, void(base::ListValue* spdy_server_list,
net::SpdySettingsMap* spdy_settings_map, net::SpdySettingsMap* spdy_settings_map,
net::AlternateProtocolMap* alternate_protocol_map, net::AlternateProtocolMap* alternate_protocol_map));
net::PipelineCapabilityMap* pipeline_capability_map));
private: private:
DISALLOW_COPY_AND_ASSIGN(TestingHttpServerPropertiesManager); DISALLOW_COPY_AND_ASSIGN(TestingHttpServerPropertiesManager);
...@@ -154,9 +152,6 @@ TEST_F(HttpServerPropertiesManagerTest, ...@@ -154,9 +152,6 @@ TEST_F(HttpServerPropertiesManagerTest,
server_pref_dict->SetWithoutPathExpansion( server_pref_dict->SetWithoutPathExpansion(
"alternate_protocol", alternate_protocol); "alternate_protocol", alternate_protocol);
// Set pipeline capability for www.google.com:80.
server_pref_dict->SetInteger("pipeline_capability", net::PIPELINE_CAPABLE);
// Set the server preference for www.google.com:80. // Set the server preference for www.google.com:80.
base::DictionaryValue* http_server_properties_dict = base::DictionaryValue* http_server_properties_dict =
new base::DictionaryValue; new base::DictionaryValue;
...@@ -186,9 +181,6 @@ TEST_F(HttpServerPropertiesManagerTest, ...@@ -186,9 +181,6 @@ TEST_F(HttpServerPropertiesManagerTest,
server_pref_dict1->SetWithoutPathExpansion( server_pref_dict1->SetWithoutPathExpansion(
"alternate_protocol", alternate_protocol1); "alternate_protocol", alternate_protocol1);
// Set pipelining capability for mail.google.com:80
server_pref_dict1->SetInteger("pipeline_capability", net::PIPELINE_INCAPABLE);
// Set the server preference for mail.google.com:80. // Set the server preference for mail.google.com:80.
http_server_properties_dict->SetWithoutPathExpansion( http_server_properties_dict->SetWithoutPathExpansion(
"mail.google.com:80", server_pref_dict1); "mail.google.com:80", server_pref_dict1);
...@@ -246,14 +238,6 @@ TEST_F(HttpServerPropertiesManagerTest, ...@@ -246,14 +238,6 @@ TEST_F(HttpServerPropertiesManagerTest,
net::HostPortPair::FromString("mail.google.com:80")); net::HostPortPair::FromString("mail.google.com:80"));
EXPECT_EQ(444, port_alternate_protocol.port); EXPECT_EQ(444, port_alternate_protocol.port);
EXPECT_EQ(net::NPN_SPDY_2, port_alternate_protocol.protocol); EXPECT_EQ(net::NPN_SPDY_2, port_alternate_protocol.protocol);
// Verify pipeline capability.
EXPECT_EQ(net::PIPELINE_CAPABLE,
http_server_props_manager_->GetPipelineCapability(
net::HostPortPair::FromString("www.google.com:80")));
EXPECT_EQ(net::PIPELINE_INCAPABLE,
http_server_props_manager_->GetPipelineCapability(
net::HostPortPair::FromString("mail.google.com:80")));
} }
TEST_F(HttpServerPropertiesManagerTest, SupportsSpdy) { TEST_F(HttpServerPropertiesManagerTest, SupportsSpdy) {
...@@ -322,33 +306,6 @@ TEST_F(HttpServerPropertiesManagerTest, HasAlternateProtocol) { ...@@ -322,33 +306,6 @@ TEST_F(HttpServerPropertiesManagerTest, HasAlternateProtocol) {
EXPECT_EQ(net::NPN_SPDY_2, port_alternate_protocol.protocol); EXPECT_EQ(net::NPN_SPDY_2, port_alternate_protocol.protocol);
} }
TEST_F(HttpServerPropertiesManagerTest, PipelineCapability) {
ExpectPrefsUpdate();
net::HostPortPair known_pipeliner("pipeline.com", 8080);
net::HostPortPair bad_pipeliner("wordpress.com", 80);
EXPECT_EQ(net::PIPELINE_UNKNOWN,
http_server_props_manager_->GetPipelineCapability(known_pipeliner));
EXPECT_EQ(net::PIPELINE_UNKNOWN,
http_server_props_manager_->GetPipelineCapability(bad_pipeliner));
// Post an update task to the IO thread. SetPipelineCapability calls
// ScheduleUpdatePrefsOnIO.
http_server_props_manager_->SetPipelineCapability(known_pipeliner,
net::PIPELINE_CAPABLE);
http_server_props_manager_->SetPipelineCapability(bad_pipeliner,
net::PIPELINE_INCAPABLE);
// Run the task.
loop_.RunAllPending();
EXPECT_EQ(net::PIPELINE_CAPABLE,
http_server_props_manager_->GetPipelineCapability(known_pipeliner));
EXPECT_EQ(net::PIPELINE_INCAPABLE,
http_server_props_manager_->GetPipelineCapability(bad_pipeliner));
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
}
TEST_F(HttpServerPropertiesManagerTest, Clear) { TEST_F(HttpServerPropertiesManagerTest, Clear) {
ExpectPrefsUpdate(); ExpectPrefsUpdate();
...@@ -364,10 +321,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { ...@@ -364,10 +321,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
spdy_settings.push_back(std::make_pair(id1, 31337)); spdy_settings.push_back(std::make_pair(id1, 31337));
http_server_props_manager_->SetSpdySettings(spdy_server_mail, spdy_settings); http_server_props_manager_->SetSpdySettings(spdy_server_mail, spdy_settings);
net::HostPortPair known_pipeliner("pipeline.com", 8080);
http_server_props_manager_->SetPipelineCapability(known_pipeliner,
net::PIPELINE_CAPABLE);
// Run the task. // Run the task.
loop_.RunAllPending(); loop_.RunAllPending();
...@@ -384,9 +337,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { ...@@ -384,9 +337,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
EXPECT_EQ(spdy::SETTINGS_FLAG_PERSISTED, id1_ret.flags()); EXPECT_EQ(spdy::SETTINGS_FLAG_PERSISTED, id1_ret.flags());
EXPECT_EQ(31337U, spdy_setting1_ret.second); EXPECT_EQ(31337U, spdy_setting1_ret.second);
EXPECT_EQ(net::PIPELINE_CAPABLE,
http_server_props_manager_->GetPipelineCapability(known_pipeliner));
Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
ExpectPrefsUpdate(); ExpectPrefsUpdate();
...@@ -404,9 +354,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { ...@@ -404,9 +354,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
http_server_props_manager_->GetSpdySettings(spdy_server_mail); http_server_props_manager_->GetSpdySettings(spdy_server_mail);
EXPECT_EQ(0U, spdy_settings1_ret.size()); EXPECT_EQ(0U, spdy_settings1_ret.size());
EXPECT_EQ(net::PIPELINE_UNKNOWN,
http_server_props_manager_->GetPipelineCapability(known_pipeliner));
Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
} }
......
...@@ -6,15 +6,14 @@ ...@@ -6,15 +6,14 @@
#define NET_HTTP_HTTP_PIPELINED_HOST_H_ #define NET_HTTP_HTTP_PIPELINED_HOST_H_
#pragma once #pragma once
#include "net/base/host_port_pair.h"
#include "net/base/net_export.h" #include "net/base/net_export.h"
#include "net/http/http_pipelined_connection.h" #include "net/http/http_pipelined_connection.h"
#include "net/http/http_pipelined_host_capability.h"
namespace net { namespace net {
class BoundNetLog; class BoundNetLog;
class ClientSocketHandle; class ClientSocketHandle;
class HostPortPair;
class HttpPipelinedStream; class HttpPipelinedStream;
class ProxyInfo; class ProxyInfo;
struct SSLConfig; struct SSLConfig;
...@@ -24,6 +23,14 @@ struct SSLConfig; ...@@ -24,6 +23,14 @@ struct SSLConfig;
// assigns requests to the least loaded pipelined connection. // assigns requests to the least loaded pipelined connection.
class NET_EXPORT_PRIVATE HttpPipelinedHost { class NET_EXPORT_PRIVATE HttpPipelinedHost {
public: public:
enum Capability {
UNKNOWN,
INCAPABLE,
CAPABLE,
PROBABLY_CAPABLE, // We are using pipelining, but haven't processed enough
// requests to record this host as known to be capable.
};
class Delegate { class Delegate {
public: public:
// Called when a pipelined host has no outstanding requests on any of its // Called when a pipelined host has no outstanding requests on any of its
...@@ -35,9 +42,8 @@ class NET_EXPORT_PRIVATE HttpPipelinedHost { ...@@ -35,9 +42,8 @@ class NET_EXPORT_PRIVATE HttpPipelinedHost {
virtual void OnHostHasAdditionalCapacity(HttpPipelinedHost* host) = 0; virtual void OnHostHasAdditionalCapacity(HttpPipelinedHost* host) = 0;
// Called when a host determines if pipelining can be used. // Called when a host determines if pipelining can be used.
virtual void OnHostDeterminedCapability( virtual void OnHostDeterminedCapability(HttpPipelinedHost* host,
HttpPipelinedHost* host, Capability capability) = 0;
HttpPipelinedHostCapability capability) = 0;
}; };
class Factory { class Factory {
...@@ -48,7 +54,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHost { ...@@ -48,7 +54,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHost {
virtual HttpPipelinedHost* CreateNewHost( virtual HttpPipelinedHost* CreateNewHost(
Delegate* delegate, const HostPortPair& origin, Delegate* delegate, const HostPortPair& origin,
HttpPipelinedConnection::Factory* factory, HttpPipelinedConnection::Factory* factory,
HttpPipelinedHostCapability capability) = 0; Capability capability) = 0;
}; };
virtual ~HttpPipelinedHost() {} virtual ~HttpPipelinedHost() {}
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_HTTP_HTTP_PIPELINED_HOST_CAPABILITY_H_
#define NET_HTTP_HTTP_PIPELINED_HOST_CAPABILITY_H_
#pragma once
namespace net {
// These values are serialized in Preferences. Do not change these values and
// only add new ones at the end.
enum HttpPipelinedHostCapability {
PIPELINE_UNKNOWN = 0,
PIPELINE_INCAPABLE = 1,
PIPELINE_CAPABLE = 2,
PIPELINE_PROBABLY_CAPABLE = 3, // We are using pipelining, but haven't
// processed enough requests to record this
// host as known to be capable.
};
} // namespace net
#endif // NET_HTTP_HTTP_PIPELINED_HOST_CAPABILITY_H_
...@@ -34,7 +34,7 @@ HttpPipelinedHostImpl::HttpPipelinedHostImpl( ...@@ -34,7 +34,7 @@ HttpPipelinedHostImpl::HttpPipelinedHostImpl(
HttpPipelinedHost::Delegate* delegate, HttpPipelinedHost::Delegate* delegate,
const HostPortPair& origin, const HostPortPair& origin,
HttpPipelinedConnection::Factory* factory, HttpPipelinedConnection::Factory* factory,
HttpPipelinedHostCapability capability) Capability capability)
: delegate_(delegate), : delegate_(delegate),
origin_(origin), origin_(origin),
factory_(factory), factory_(factory),
...@@ -54,7 +54,7 @@ HttpPipelinedStream* HttpPipelinedHostImpl::CreateStreamOnNewPipeline( ...@@ -54,7 +54,7 @@ HttpPipelinedStream* HttpPipelinedHostImpl::CreateStreamOnNewPipeline(
const ProxyInfo& used_proxy_info, const ProxyInfo& used_proxy_info,
const BoundNetLog& net_log, const BoundNetLog& net_log,
bool was_npn_negotiated) { bool was_npn_negotiated) {
if (capability_ == PIPELINE_INCAPABLE) { if (capability_ == INCAPABLE) {
return NULL; return NULL;
} }
HttpPipelinedConnection* pipeline = factory_->CreateNewPipeline( HttpPipelinedConnection* pipeline = factory_->CreateNewPipeline(
...@@ -124,21 +124,21 @@ void HttpPipelinedHostImpl::OnPipelineFeedback( ...@@ -124,21 +124,21 @@ void HttpPipelinedHostImpl::OnPipelineFeedback(
switch (feedback) { switch (feedback) {
case HttpPipelinedConnection::OK: case HttpPipelinedConnection::OK:
++pipelines_[pipeline].num_successes; ++pipelines_[pipeline].num_successes;
if (capability_ == PIPELINE_UNKNOWN) { if (capability_ == UNKNOWN) {
capability_ = PIPELINE_PROBABLY_CAPABLE; capability_ = PROBABLY_CAPABLE;
NotifyAllPipelinesHaveCapacity(); NotifyAllPipelinesHaveCapacity();
} else if (capability_ == PIPELINE_PROBABLY_CAPABLE && } else if (capability_ == PROBABLY_CAPABLE &&
pipelines_[pipeline].num_successes >= pipelines_[pipeline].num_successes >=
kNumKnownSuccessesThreshold) { kNumKnownSuccessesThreshold) {
capability_ = PIPELINE_CAPABLE; capability_ = CAPABLE;
delegate_->OnHostDeterminedCapability(this, PIPELINE_CAPABLE); delegate_->OnHostDeterminedCapability(this, CAPABLE);
} }
break; break;
case HttpPipelinedConnection::PIPELINE_SOCKET_ERROR: case HttpPipelinedConnection::PIPELINE_SOCKET_ERROR:
case HttpPipelinedConnection::OLD_HTTP_VERSION: case HttpPipelinedConnection::OLD_HTTP_VERSION:
capability_ = PIPELINE_INCAPABLE; capability_ = INCAPABLE;
delegate_->OnHostDeterminedCapability(this, PIPELINE_INCAPABLE); delegate_->OnHostDeterminedCapability(this, INCAPABLE);
break; break;
case HttpPipelinedConnection::MUST_CLOSE_CONNECTION: case HttpPipelinedConnection::MUST_CLOSE_CONNECTION:
...@@ -149,15 +149,15 @@ void HttpPipelinedHostImpl::OnPipelineFeedback( ...@@ -149,15 +149,15 @@ void HttpPipelinedHostImpl::OnPipelineFeedback(
int HttpPipelinedHostImpl::GetPipelineCapacity() const { int HttpPipelinedHostImpl::GetPipelineCapacity() const {
int capacity = 0; int capacity = 0;
switch (capability_) { switch (capability_) {
case PIPELINE_CAPABLE: case CAPABLE:
case PIPELINE_PROBABLY_CAPABLE: case PROBABLY_CAPABLE:
capacity = max_pipeline_depth(); capacity = max_pipeline_depth();
break; break;
case PIPELINE_INCAPABLE: case INCAPABLE:
CHECK(false); CHECK(false);
case PIPELINE_UNKNOWN: case UNKNOWN:
capacity = 1; capacity = 1;
break; break;
...@@ -169,7 +169,7 @@ int HttpPipelinedHostImpl::GetPipelineCapacity() const { ...@@ -169,7 +169,7 @@ int HttpPipelinedHostImpl::GetPipelineCapacity() const {
bool HttpPipelinedHostImpl::CanPipelineAcceptRequests( bool HttpPipelinedHostImpl::CanPipelineAcceptRequests(
HttpPipelinedConnection* pipeline) const { HttpPipelinedConnection* pipeline) const {
return capability_ != PIPELINE_INCAPABLE && return capability_ != INCAPABLE &&
pipeline->usable() && pipeline->usable() &&
pipeline->active() && pipeline->active() &&
pipeline->depth() < GetPipelineCapacity(); pipeline->depth() < GetPipelineCapacity();
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "net/base/net_export.h" #include "net/base/net_export.h"
#include "net/http/http_pipelined_connection.h" #include "net/http/http_pipelined_connection.h"
#include "net/http/http_pipelined_host.h" #include "net/http/http_pipelined_host.h"
#include "net/http/http_pipelined_host_capability.h"
namespace net { namespace net {
...@@ -35,7 +34,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostImpl ...@@ -35,7 +34,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostImpl
HttpPipelinedHostImpl(HttpPipelinedHost::Delegate* delegate, HttpPipelinedHostImpl(HttpPipelinedHost::Delegate* delegate,
const HostPortPair& origin, const HostPortPair& origin,
HttpPipelinedConnection::Factory* factory, HttpPipelinedConnection::Factory* factory,
HttpPipelinedHostCapability capability); Capability capability);
virtual ~HttpPipelinedHostImpl(); virtual ~HttpPipelinedHostImpl();
// HttpPipelinedHost interface // HttpPipelinedHost interface
...@@ -99,7 +98,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostImpl ...@@ -99,7 +98,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostImpl
const HostPortPair origin_; const HostPortPair origin_;
PipelineInfoMap pipelines_; PipelineInfoMap pipelines_;
scoped_ptr<HttpPipelinedConnection::Factory> factory_; scoped_ptr<HttpPipelinedConnection::Factory> factory_;
HttpPipelinedHostCapability capability_; Capability capability_;
DISALLOW_COPY_AND_ASSIGN(HttpPipelinedHostImpl); DISALLOW_COPY_AND_ASSIGN(HttpPipelinedHostImpl);
}; };
......
...@@ -32,7 +32,7 @@ class MockHostDelegate : public HttpPipelinedHost::Delegate { ...@@ -32,7 +32,7 @@ class MockHostDelegate : public HttpPipelinedHost::Delegate {
MOCK_METHOD1(OnHostHasAdditionalCapacity, void(HttpPipelinedHost* host)); MOCK_METHOD1(OnHostHasAdditionalCapacity, void(HttpPipelinedHost* host));
MOCK_METHOD2(OnHostDeterminedCapability, MOCK_METHOD2(OnHostDeterminedCapability,
void(HttpPipelinedHost* host, void(HttpPipelinedHost* host,
HttpPipelinedHostCapability capability)); HttpPipelinedHost::Capability capability));
}; };
class MockPipelineFactory : public HttpPipelinedConnection::Factory { class MockPipelineFactory : public HttpPipelinedConnection::Factory {
...@@ -83,10 +83,10 @@ class HttpPipelinedHostImplTest : public testing::Test { ...@@ -83,10 +83,10 @@ class HttpPipelinedHostImplTest : public testing::Test {
: origin_("host", 123), : origin_("host", 123),
factory_(new MockPipelineFactory), // Owned by host_. factory_(new MockPipelineFactory), // Owned by host_.
host_(new HttpPipelinedHostImpl(&delegate_, origin_, factory_, host_(new HttpPipelinedHostImpl(&delegate_, origin_, factory_,
PIPELINE_CAPABLE)) { HttpPipelinedHost::CAPABLE)) {
} }
void SetCapability(HttpPipelinedHostCapability capability) { void SetCapability(HttpPipelinedHost::Capability capability) {
factory_ = new MockPipelineFactory; factory_ = new MockPipelineFactory;
host_.reset(new HttpPipelinedHostImpl( host_.reset(new HttpPipelinedHostImpl(
&delegate_, origin_, factory_, capability)); &delegate_, origin_, factory_, capability));
...@@ -200,7 +200,7 @@ TEST_F(HttpPipelinedHostImplTest, PicksLeastLoadedPipeline) { ...@@ -200,7 +200,7 @@ TEST_F(HttpPipelinedHostImplTest, PicksLeastLoadedPipeline) {
} }
TEST_F(HttpPipelinedHostImplTest, OpensUpOnPipelineSuccess) { TEST_F(HttpPipelinedHostImplTest, OpensUpOnPipelineSuccess) {
SetCapability(PIPELINE_UNKNOWN); SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline = AddTestPipeline(1, true, true); MockPipeline* pipeline = AddTestPipeline(1, true, true);
EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline()); EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline());
...@@ -219,7 +219,7 @@ TEST_F(HttpPipelinedHostImplTest, OpensUpOnPipelineSuccess) { ...@@ -219,7 +219,7 @@ TEST_F(HttpPipelinedHostImplTest, OpensUpOnPipelineSuccess) {
} }
TEST_F(HttpPipelinedHostImplTest, OpensAllPipelinesOnPipelineSuccess) { TEST_F(HttpPipelinedHostImplTest, OpensAllPipelinesOnPipelineSuccess) {
SetCapability(PIPELINE_UNKNOWN); SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline1 = AddTestPipeline(1, false, true); MockPipeline* pipeline1 = AddTestPipeline(1, false, true);
MockPipeline* pipeline2 = AddTestPipeline(1, true, true); MockPipeline* pipeline2 = AddTestPipeline(1, true, true);
...@@ -240,14 +240,15 @@ TEST_F(HttpPipelinedHostImplTest, OpensAllPipelinesOnPipelineSuccess) { ...@@ -240,14 +240,15 @@ TEST_F(HttpPipelinedHostImplTest, OpensAllPipelinesOnPipelineSuccess) {
} }
TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) { TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) {
SetCapability(PIPELINE_UNKNOWN); SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline = AddTestPipeline(1, true, true); MockPipeline* pipeline = AddTestPipeline(1, true, true);
EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline()); EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline());
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())) EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
.Times(0); .Times(0);
EXPECT_CALL(delegate_, EXPECT_CALL(delegate_,
OnHostDeterminedCapability(host_.get(), PIPELINE_INCAPABLE)) OnHostDeterminedCapability(host_.get(),
HttpPipelinedHost::INCAPABLE))
.Times(1); .Times(1);
host_->OnPipelineFeedback(pipeline, host_->OnPipelineFeedback(pipeline,
HttpPipelinedConnection::OLD_HTTP_VERSION); HttpPipelinedConnection::OLD_HTTP_VERSION);
...@@ -258,7 +259,7 @@ TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) { ...@@ -258,7 +259,7 @@ TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) {
} }
TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) { TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) {
SetCapability(PIPELINE_UNKNOWN); SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline = AddTestPipeline(1, true, true); MockPipeline* pipeline = AddTestPipeline(1, true, true);
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())) EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
...@@ -275,13 +276,14 @@ TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) { ...@@ -275,13 +276,14 @@ TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) {
} }
TEST_F(HttpPipelinedHostImplTest, SuccessesLeadToCapable) { TEST_F(HttpPipelinedHostImplTest, SuccessesLeadToCapable) {
SetCapability(PIPELINE_UNKNOWN); SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline = AddTestPipeline(1, true, true); MockPipeline* pipeline = AddTestPipeline(1, true, true);
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())) EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
.Times(1); .Times(1);
EXPECT_CALL(delegate_, EXPECT_CALL(delegate_,
OnHostDeterminedCapability(host_.get(), PIPELINE_CAPABLE)) OnHostDeterminedCapability(host_.get(),
HttpPipelinedHost::CAPABLE))
.Times(1); .Times(1);
host_->OnPipelineFeedback(pipeline, HttpPipelinedConnection::OK); host_->OnPipelineFeedback(pipeline, HttpPipelinedConnection::OK);
......
...@@ -6,29 +6,31 @@ ...@@ -6,29 +6,31 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "net/http/http_pipelined_host_capability.h"
#include "net/http/http_pipelined_host_impl.h" #include "net/http/http_pipelined_host_impl.h"
#include "net/http/http_server_properties.h"
namespace net { namespace net {
// TODO(simonjam): Run experiments with different values of this to see what
// value is good at avoiding evictions without eating too much memory. Until
// then, this is just a bad guess.
static const int kNumHostsToRemember = 200;
class HttpPipelinedHostImplFactory : public HttpPipelinedHost::Factory { class HttpPipelinedHostImplFactory : public HttpPipelinedHost::Factory {
public: public:
virtual HttpPipelinedHost* CreateNewHost( virtual HttpPipelinedHost* CreateNewHost(
HttpPipelinedHost::Delegate* delegate, const HostPortPair& origin, HttpPipelinedHost::Delegate* delegate, const HostPortPair& origin,
HttpPipelinedConnection::Factory* factory, HttpPipelinedConnection::Factory* factory,
HttpPipelinedHostCapability capability) OVERRIDE { HttpPipelinedHost::Capability capability) OVERRIDE {
return new HttpPipelinedHostImpl(delegate, origin, factory, capability); return new HttpPipelinedHostImpl(delegate, origin, factory, capability);
} }
}; };
HttpPipelinedHostPool::HttpPipelinedHostPool( HttpPipelinedHostPool::HttpPipelinedHostPool(
Delegate* delegate, Delegate* delegate,
HttpPipelinedHost::Factory* factory, HttpPipelinedHost::Factory* factory)
HttpServerProperties* http_server_properties)
: delegate_(delegate), : delegate_(delegate),
factory_(factory), factory_(factory),
http_server_properties_(http_server_properties) { known_capability_map_(kNumHostsToRemember) {
if (!factory) { if (!factory) {
factory_.reset(new HttpPipelinedHostImplFactory); factory_.reset(new HttpPipelinedHostImplFactory);
} }
...@@ -40,9 +42,8 @@ HttpPipelinedHostPool::~HttpPipelinedHostPool() { ...@@ -40,9 +42,8 @@ HttpPipelinedHostPool::~HttpPipelinedHostPool() {
bool HttpPipelinedHostPool::IsHostEligibleForPipelining( bool HttpPipelinedHostPool::IsHostEligibleForPipelining(
const HostPortPair& origin) { const HostPortPair& origin) {
HttpPipelinedHostCapability capability = HttpPipelinedHost::Capability capability = GetHostCapability(origin);
http_server_properties_->GetPipelineCapability(origin); return capability != HttpPipelinedHost::INCAPABLE;
return capability != PIPELINE_INCAPABLE;
} }
HttpPipelinedStream* HttpPipelinedHostPool::CreateStreamOnNewPipeline( HttpPipelinedStream* HttpPipelinedHostPool::CreateStreamOnNewPipeline(
...@@ -89,9 +90,8 @@ HttpPipelinedHost* HttpPipelinedHostPool::GetPipelinedHost( ...@@ -89,9 +90,8 @@ HttpPipelinedHost* HttpPipelinedHostPool::GetPipelinedHost(
return NULL; return NULL;
} }
HttpPipelinedHostCapability capability = HttpPipelinedHost::Capability capability = GetHostCapability(origin);
http_server_properties_->GetPipelineCapability(origin); if (capability == HttpPipelinedHost::INCAPABLE) {
if (capability == PIPELINE_INCAPABLE) {
return NULL; return NULL;
} }
...@@ -115,8 +115,22 @@ void HttpPipelinedHostPool::OnHostHasAdditionalCapacity( ...@@ -115,8 +115,22 @@ void HttpPipelinedHostPool::OnHostHasAdditionalCapacity(
void HttpPipelinedHostPool::OnHostDeterminedCapability( void HttpPipelinedHostPool::OnHostDeterminedCapability(
HttpPipelinedHost* host, HttpPipelinedHost* host,
HttpPipelinedHostCapability capability) { HttpPipelinedHost::Capability capability) {
http_server_properties_->SetPipelineCapability(host->origin(), capability); CapabilityMap::iterator known_it = known_capability_map_.Get(host->origin());
if (known_it == known_capability_map_.end() ||
known_it->second != HttpPipelinedHost::INCAPABLE) {
known_capability_map_.Put(host->origin(), capability);
}
}
HttpPipelinedHost::Capability HttpPipelinedHostPool::GetHostCapability(
const HostPortPair& origin) {
HttpPipelinedHost::Capability capability = HttpPipelinedHost::UNKNOWN;
CapabilityMap::const_iterator it = known_capability_map_.Get(origin);
if (it != known_capability_map_.end()) {
capability = it->second;
}
return capability;
} }
} // namespace net } // namespace net
...@@ -10,15 +10,14 @@ ...@@ -10,15 +10,14 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/memory/mru_cache.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "net/http/http_pipelined_host.h" #include "net/http/http_pipelined_host.h"
#include "net/http/http_pipelined_host_capability.h"
namespace net { namespace net {
class HostPortPair; class HostPortPair;
class HttpPipelinedStream; class HttpPipelinedStream;
class HttpServerProperties;
// Manages all of the pipelining state for specific host with active pipelined // Manages all of the pipelining state for specific host with active pipelined
// HTTP requests. Manages connection jobs, constructs pipelined streams, and // HTTP requests. Manages connection jobs, constructs pipelined streams, and
...@@ -35,8 +34,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool ...@@ -35,8 +34,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool
}; };
HttpPipelinedHostPool(Delegate* delegate, HttpPipelinedHostPool(Delegate* delegate,
HttpPipelinedHost::Factory* factory, HttpPipelinedHost::Factory* factory);
HttpServerProperties* http_server_properties_);
virtual ~HttpPipelinedHostPool(); virtual ~HttpPipelinedHostPool();
// Returns true if pipelining might work for |origin|. Generally, this returns // Returns true if pipelining might work for |origin|. Generally, this returns
...@@ -69,18 +67,22 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool ...@@ -69,18 +67,22 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool
virtual void OnHostDeterminedCapability( virtual void OnHostDeterminedCapability(
HttpPipelinedHost* host, HttpPipelinedHost* host,
HttpPipelinedHostCapability capability) OVERRIDE; HttpPipelinedHost::Capability capability) OVERRIDE;
private: private:
typedef base::MRUCache<HostPortPair,
HttpPipelinedHost::Capability> CapabilityMap;
typedef std::map<const HostPortPair, HttpPipelinedHost*> HostMap; typedef std::map<const HostPortPair, HttpPipelinedHost*> HostMap;
HttpPipelinedHost* GetPipelinedHost(const HostPortPair& origin, HttpPipelinedHost* GetPipelinedHost(const HostPortPair& origin,
bool create_if_not_found); bool create_if_not_found);
HttpPipelinedHost::Capability GetHostCapability(const HostPortPair& origin);
Delegate* delegate_; Delegate* delegate_;
scoped_ptr<HttpPipelinedHost::Factory> factory_; scoped_ptr<HttpPipelinedHost::Factory> factory_;
HostMap host_map_; HostMap host_map_;
HttpServerProperties* http_server_properties_; CapabilityMap known_capability_map_;
DISALLOW_COPY_AND_ASSIGN(HttpPipelinedHostPool); DISALLOW_COPY_AND_ASSIGN(HttpPipelinedHostPool);
}; };
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "net/base/ssl_config_service.h" #include "net/base/ssl_config_service.h"
#include "net/http/http_pipelined_host.h" #include "net/http/http_pipelined_host.h"
#include "net/http/http_pipelined_host_capability.h"
#include "net/http/http_server_properties_impl.h"
#include "net/proxy/proxy_info.h" #include "net/proxy/proxy_info.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -38,7 +36,7 @@ class MockHostFactory : public HttpPipelinedHost::Factory { ...@@ -38,7 +36,7 @@ class MockHostFactory : public HttpPipelinedHost::Factory {
MOCK_METHOD4(CreateNewHost, HttpPipelinedHost*( MOCK_METHOD4(CreateNewHost, HttpPipelinedHost*(
HttpPipelinedHost::Delegate* delegate, const HostPortPair& origin, HttpPipelinedHost::Delegate* delegate, const HostPortPair& origin,
HttpPipelinedConnection::Factory* factory, HttpPipelinedConnection::Factory* factory,
HttpPipelinedHostCapability capability)); HttpPipelinedHost::Capability capability));
}; };
class MockHost : public HttpPipelinedHost { class MockHost : public HttpPipelinedHost {
...@@ -68,9 +66,7 @@ class HttpPipelinedHostPoolTest : public testing::Test { ...@@ -68,9 +66,7 @@ class HttpPipelinedHostPoolTest : public testing::Test {
: origin_("host", 123), : origin_("host", 123),
factory_(new MockHostFactory), // Owned by pool_. factory_(new MockHostFactory), // Owned by pool_.
host_(new MockHost(origin_)), // Owned by pool_. host_(new MockHost(origin_)), // Owned by pool_.
http_server_properties_(new HttpServerPropertiesImpl), pool_(new HttpPipelinedHostPool(&delegate_, factory_)),
pool_(new HttpPipelinedHostPool(&delegate_, factory_,
http_server_properties_.get())),
was_npn_negotiated_(false) { was_npn_negotiated_(false) {
} }
...@@ -92,7 +88,6 @@ class HttpPipelinedHostPoolTest : public testing::Test { ...@@ -92,7 +88,6 @@ class HttpPipelinedHostPoolTest : public testing::Test {
MockPoolDelegate delegate_; MockPoolDelegate delegate_;
MockHostFactory* factory_; MockHostFactory* factory_;
MockHost* host_; MockHost* host_;
scoped_ptr<HttpServerPropertiesImpl> http_server_properties_;
scoped_ptr<HttpPipelinedHostPool> pool_; scoped_ptr<HttpPipelinedHostPool> pool_;
const SSLConfig ssl_config_; const SSLConfig ssl_config_;
...@@ -104,7 +99,7 @@ class HttpPipelinedHostPoolTest : public testing::Test { ...@@ -104,7 +99,7 @@ class HttpPipelinedHostPoolTest : public testing::Test {
TEST_F(HttpPipelinedHostPoolTest, DefaultUnknown) { TEST_F(HttpPipelinedHostPoolTest, DefaultUnknown) {
EXPECT_TRUE(pool_->IsHostEligibleForPipelining(origin_)); EXPECT_TRUE(pool_->IsHostEligibleForPipelining(origin_));
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_UNKNOWN)) HttpPipelinedHost::UNKNOWN))
.Times(1) .Times(1)
.WillOnce(Return(host_)); .WillOnce(Return(host_));
...@@ -114,16 +109,16 @@ TEST_F(HttpPipelinedHostPoolTest, DefaultUnknown) { ...@@ -114,16 +109,16 @@ TEST_F(HttpPipelinedHostPoolTest, DefaultUnknown) {
TEST_F(HttpPipelinedHostPoolTest, RemembersIncapable) { TEST_F(HttpPipelinedHostPoolTest, RemembersIncapable) {
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_UNKNOWN)) HttpPipelinedHost::UNKNOWN))
.Times(1) .Times(1)
.WillOnce(Return(host_)); .WillOnce(Return(host_));
CreateDummyStream(); CreateDummyStream();
pool_->OnHostDeterminedCapability(host_, PIPELINE_INCAPABLE); pool_->OnHostDeterminedCapability(host_, HttpPipelinedHost::INCAPABLE);
pool_->OnHostIdle(host_); pool_->OnHostIdle(host_);
EXPECT_FALSE(pool_->IsHostEligibleForPipelining(origin_)); EXPECT_FALSE(pool_->IsHostEligibleForPipelining(origin_));
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_INCAPABLE)) HttpPipelinedHost::INCAPABLE))
.Times(0); .Times(0);
EXPECT_EQ(NULL, EXPECT_EQ(NULL,
pool_->CreateStreamOnNewPipeline(origin_, kDummyConnection, pool_->CreateStreamOnNewPipeline(origin_, kDummyConnection,
...@@ -133,18 +128,18 @@ TEST_F(HttpPipelinedHostPoolTest, RemembersIncapable) { ...@@ -133,18 +128,18 @@ TEST_F(HttpPipelinedHostPoolTest, RemembersIncapable) {
TEST_F(HttpPipelinedHostPoolTest, RemembersCapable) { TEST_F(HttpPipelinedHostPoolTest, RemembersCapable) {
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_UNKNOWN)) HttpPipelinedHost::UNKNOWN))
.Times(1) .Times(1)
.WillOnce(Return(host_)); .WillOnce(Return(host_));
CreateDummyStream(); CreateDummyStream();
pool_->OnHostDeterminedCapability(host_, PIPELINE_CAPABLE); pool_->OnHostDeterminedCapability(host_, HttpPipelinedHost::CAPABLE);
pool_->OnHostIdle(host_); pool_->OnHostIdle(host_);
EXPECT_TRUE(pool_->IsHostEligibleForPipelining(origin_)); EXPECT_TRUE(pool_->IsHostEligibleForPipelining(origin_));
host_ = new MockHost(origin_); host_ = new MockHost(origin_);
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_CAPABLE)) HttpPipelinedHost::CAPABLE))
.Times(1) .Times(1)
.WillOnce(Return(host_)); .WillOnce(Return(host_));
CreateDummyStream(); CreateDummyStream();
...@@ -153,21 +148,21 @@ TEST_F(HttpPipelinedHostPoolTest, RemembersCapable) { ...@@ -153,21 +148,21 @@ TEST_F(HttpPipelinedHostPoolTest, RemembersCapable) {
TEST_F(HttpPipelinedHostPoolTest, IncapableIsSticky) { TEST_F(HttpPipelinedHostPoolTest, IncapableIsSticky) {
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_UNKNOWN)) HttpPipelinedHost::UNKNOWN))
.Times(1) .Times(1)
.WillOnce(Return(host_)); .WillOnce(Return(host_));
CreateDummyStream(); CreateDummyStream();
pool_->OnHostDeterminedCapability(host_, PIPELINE_CAPABLE); pool_->OnHostDeterminedCapability(host_, HttpPipelinedHost::CAPABLE);
pool_->OnHostDeterminedCapability(host_, PIPELINE_INCAPABLE); pool_->OnHostDeterminedCapability(host_, HttpPipelinedHost::INCAPABLE);
pool_->OnHostDeterminedCapability(host_, PIPELINE_CAPABLE); pool_->OnHostDeterminedCapability(host_, HttpPipelinedHost::CAPABLE);
pool_->OnHostIdle(host_); pool_->OnHostIdle(host_);
EXPECT_FALSE(pool_->IsHostEligibleForPipelining(origin_)); EXPECT_FALSE(pool_->IsHostEligibleForPipelining(origin_));
} }
TEST_F(HttpPipelinedHostPoolTest, RemainsUnknownWithoutFeedback) { TEST_F(HttpPipelinedHostPoolTest, RemainsUnknownWithoutFeedback) {
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_UNKNOWN)) HttpPipelinedHost::UNKNOWN))
.Times(1) .Times(1)
.WillOnce(Return(host_)); .WillOnce(Return(host_));
...@@ -177,7 +172,7 @@ TEST_F(HttpPipelinedHostPoolTest, RemainsUnknownWithoutFeedback) { ...@@ -177,7 +172,7 @@ TEST_F(HttpPipelinedHostPoolTest, RemainsUnknownWithoutFeedback) {
host_ = new MockHost(origin_); host_ = new MockHost(origin_);
EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _, EXPECT_CALL(*factory_, CreateNewHost(pool_.get(), Ref(origin_), _,
PIPELINE_UNKNOWN)) HttpPipelinedHost::UNKNOWN))
.Times(1) .Times(1)
.WillOnce(Return(host_)); .WillOnce(Return(host_));
...@@ -185,14 +180,6 @@ TEST_F(HttpPipelinedHostPoolTest, RemainsUnknownWithoutFeedback) { ...@@ -185,14 +180,6 @@ TEST_F(HttpPipelinedHostPoolTest, RemainsUnknownWithoutFeedback) {
pool_->OnHostIdle(host_); pool_->OnHostIdle(host_);
} }
TEST_F(HttpPipelinedHostPoolTest, PopulatesServerProperties) {
EXPECT_EQ(PIPELINE_UNKNOWN,
http_server_properties_->GetPipelineCapability(host_->origin()));
pool_->OnHostDeterminedCapability(host_, PIPELINE_CAPABLE);
EXPECT_EQ(PIPELINE_CAPABLE,
http_server_properties_->GetPipelineCapability(host_->origin()));
}
} // anonymous namespace } // anonymous namespace
} // namespace net } // namespace net
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "net/base/host_port_pair.h" #include "net/base/host_port_pair.h"
#include "net/base/net_export.h" #include "net/base/net_export.h"
#include "net/http/http_pipelined_host_capability.h"
#include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this.
namespace net { namespace net {
...@@ -36,8 +35,6 @@ struct NET_EXPORT PortAlternateProtocolPair { ...@@ -36,8 +35,6 @@ struct NET_EXPORT PortAlternateProtocolPair {
typedef std::map<HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap; typedef std::map<HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap;
typedef std::map<HostPortPair, spdy::SpdySettings> SpdySettingsMap; typedef std::map<HostPortPair, spdy::SpdySettings> SpdySettingsMap;
typedef std::map<HostPortPair,
HttpPipelinedHostCapability> PipelineCapabilityMap;
extern const char kAlternateProtocolHeader[]; extern const char kAlternateProtocolHeader[];
extern const char* const kAlternateProtocolStrings[NUM_ALTERNATE_PROTOCOLS]; extern const char* const kAlternateProtocolStrings[NUM_ALTERNATE_PROTOCOLS];
...@@ -98,17 +95,6 @@ class NET_EXPORT HttpServerProperties { ...@@ -98,17 +95,6 @@ class NET_EXPORT HttpServerProperties {
// Returns all persistent SpdySettings. // Returns all persistent SpdySettings.
virtual const SpdySettingsMap& spdy_settings_map() const = 0; virtual const SpdySettingsMap& spdy_settings_map() const = 0;
virtual HttpPipelinedHostCapability GetPipelineCapability(
const HostPortPair& origin) = 0;
virtual void SetPipelineCapability(
const HostPortPair& origin,
HttpPipelinedHostCapability capability) = 0;
virtual void ClearPipelineCapabilities() = 0;
virtual PipelineCapabilityMap GetPipelineCapabilityMap() const = 0;
private: private:
DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
}; };
......
...@@ -8,18 +8,10 @@ ...@@ -8,18 +8,10 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/stringprintf.h" #include "base/stringprintf.h"
#include "net/http/http_pipelined_host_capability.h"
namespace net { namespace net {
// TODO(simonjam): Run experiments with different values of this to see what HttpServerPropertiesImpl::HttpServerPropertiesImpl() {
// value is good at avoiding evictions without eating too much memory. Until
// then, this is just a bad guess.
static const int kDefaultNumHostsToRemember = 200;
HttpServerPropertiesImpl::HttpServerPropertiesImpl()
: pipeline_capability_map_(
new CachedPipelineCapabilityMap(kDefaultNumHostsToRemember)) {
} }
HttpServerPropertiesImpl::~HttpServerPropertiesImpl() { HttpServerPropertiesImpl::~HttpServerPropertiesImpl() {
...@@ -56,21 +48,6 @@ void HttpServerPropertiesImpl::InitializeSpdySettingsServers( ...@@ -56,21 +48,6 @@ void HttpServerPropertiesImpl::InitializeSpdySettingsServers(
spdy_settings_map_.swap(*spdy_settings_map); spdy_settings_map_.swap(*spdy_settings_map);
} }
void HttpServerPropertiesImpl::InitializePipelineCapabilities(
const PipelineCapabilityMap* pipeline_capability_map) {
PipelineCapabilityMap::const_iterator it;
pipeline_capability_map_->Clear();
for (it = pipeline_capability_map->begin();
it != pipeline_capability_map->end(); ++it) {
pipeline_capability_map_->Put(it->first, it->second);
}
}
void HttpServerPropertiesImpl::SetNumPipelinedHostsToRemember(int max_size) {
DCHECK(pipeline_capability_map_->empty());
pipeline_capability_map_.reset(new CachedPipelineCapabilityMap(max_size));
}
void HttpServerPropertiesImpl::GetSpdyServerList( void HttpServerPropertiesImpl::GetSpdyServerList(
base::ListValue* spdy_server_list) const { base::ListValue* spdy_server_list) const {
DCHECK(CalledOnValidThread()); DCHECK(CalledOnValidThread());
...@@ -117,7 +94,6 @@ void HttpServerPropertiesImpl::Clear() { ...@@ -117,7 +94,6 @@ void HttpServerPropertiesImpl::Clear() {
spdy_servers_table_.clear(); spdy_servers_table_.clear();
alternate_protocol_map_.clear(); alternate_protocol_map_.clear();
spdy_settings_map_.clear(); spdy_settings_map_.clear();
pipeline_capability_map_->Clear();
} }
bool HttpServerPropertiesImpl::SupportsSpdy( bool HttpServerPropertiesImpl::SupportsSpdy(
...@@ -263,41 +239,4 @@ HttpServerPropertiesImpl::spdy_settings_map() const { ...@@ -263,41 +239,4 @@ HttpServerPropertiesImpl::spdy_settings_map() const {
return spdy_settings_map_; return spdy_settings_map_;
} }
HttpPipelinedHostCapability HttpServerPropertiesImpl::GetPipelineCapability(
const HostPortPair& origin) {
HttpPipelinedHostCapability capability = PIPELINE_UNKNOWN;
CachedPipelineCapabilityMap::const_iterator it =
pipeline_capability_map_->Get(origin);
if (it != pipeline_capability_map_->end()) {
capability = it->second;
}
return capability;
}
void HttpServerPropertiesImpl::SetPipelineCapability(
const HostPortPair& origin,
HttpPipelinedHostCapability capability) {
CachedPipelineCapabilityMap::iterator it =
pipeline_capability_map_->Peek(origin);
if (it == pipeline_capability_map_->end() ||
it->second != PIPELINE_INCAPABLE) {
pipeline_capability_map_->Put(origin, capability);
}
}
void HttpServerPropertiesImpl::ClearPipelineCapabilities() {
pipeline_capability_map_->Clear();
}
PipelineCapabilityMap
HttpServerPropertiesImpl::GetPipelineCapabilityMap() const {
PipelineCapabilityMap result;
CachedPipelineCapabilityMap::const_iterator it;
for (it = pipeline_capability_map_->begin();
it != pipeline_capability_map_->end(); ++it) {
result[it->first] = it->second;
}
return result;
}
} // namespace net } // namespace net
...@@ -12,12 +12,10 @@ ...@@ -12,12 +12,10 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/hash_tables.h" #include "base/hash_tables.h"
#include "base/memory/mru_cache.h"
#include "base/threading/non_thread_safe.h" #include "base/threading/non_thread_safe.h"
#include "base/values.h" #include "base/values.h"
#include "net/base/host_port_pair.h" #include "net/base/host_port_pair.h"
#include "net/base/net_export.h" #include "net/base/net_export.h"
#include "net/http/http_pipelined_host_capability.h"
#include "net/http/http_server_properties.h" #include "net/http/http_server_properties.h"
namespace base { namespace base {
...@@ -44,11 +42,6 @@ class NET_EXPORT HttpServerPropertiesImpl ...@@ -44,11 +42,6 @@ class NET_EXPORT HttpServerPropertiesImpl
void InitializeSpdySettingsServers(SpdySettingsMap* spdy_settings_map); void InitializeSpdySettingsServers(SpdySettingsMap* spdy_settings_map);
// Initializes |pipeline_capability_map_| with the servers (host/port) from
// |pipeline_capability_map| that either support HTTP pipelining or not.
void InitializePipelineCapabilities(
const PipelineCapabilityMap* pipeline_capability_map);
// Get the list of servers (host/port) that support SPDY. // Get the list of servers (host/port) that support SPDY.
void GetSpdyServerList(base::ListValue* spdy_server_list) const; void GetSpdyServerList(base::ListValue* spdy_server_list) const;
...@@ -63,12 +56,6 @@ class NET_EXPORT HttpServerPropertiesImpl ...@@ -63,12 +56,6 @@ class NET_EXPORT HttpServerPropertiesImpl
static void ForceAlternateProtocol(const PortAlternateProtocolPair& pair); static void ForceAlternateProtocol(const PortAlternateProtocolPair& pair);
static void DisableForcedAlternateProtocol(); static void DisableForcedAlternateProtocol();
// Changes the number of host/port pairs we remember pipelining capability
// for. A larger number means we're more likely to be able to pipeline
// immediately if a host is known good, but uses more memory. This function
// can only be called if |pipeline_capability_map_| is empty.
void SetNumPipelinedHostsToRemember(int max_size);
// ----------------------------- // -----------------------------
// HttpServerProperties methods: // HttpServerProperties methods:
// ----------------------------- // -----------------------------
...@@ -119,20 +106,7 @@ class NET_EXPORT HttpServerPropertiesImpl ...@@ -119,20 +106,7 @@ class NET_EXPORT HttpServerPropertiesImpl
// Returns all persistent SpdySettings. // Returns all persistent SpdySettings.
virtual const SpdySettingsMap& spdy_settings_map() const OVERRIDE; virtual const SpdySettingsMap& spdy_settings_map() const OVERRIDE;
virtual HttpPipelinedHostCapability GetPipelineCapability(
const HostPortPair& origin) OVERRIDE;
virtual void SetPipelineCapability(
const HostPortPair& origin,
HttpPipelinedHostCapability capability) OVERRIDE;
virtual void ClearPipelineCapabilities() OVERRIDE;
virtual PipelineCapabilityMap GetPipelineCapabilityMap() const OVERRIDE;
private: private:
typedef base::MRUCache<
HostPortPair, HttpPipelinedHostCapability> CachedPipelineCapabilityMap;
// |spdy_servers_table_| has flattened representation of servers (host/port // |spdy_servers_table_| has flattened representation of servers (host/port
// pair) that either support or not support SPDY protocol. // pair) that either support or not support SPDY protocol.
typedef base::hash_map<std::string, bool> SpdyServerHostPortTable; typedef base::hash_map<std::string, bool> SpdyServerHostPortTable;
...@@ -140,7 +114,6 @@ class NET_EXPORT HttpServerPropertiesImpl ...@@ -140,7 +114,6 @@ class NET_EXPORT HttpServerPropertiesImpl
AlternateProtocolMap alternate_protocol_map_; AlternateProtocolMap alternate_protocol_map_;
SpdySettingsMap spdy_settings_map_; SpdySettingsMap spdy_settings_map_;
scoped_ptr<CachedPipelineCapabilityMap> pipeline_capability_map_;
DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl);
}; };
......
...@@ -37,8 +37,7 @@ GURL UpgradeUrlToHttps(const GURL& original_url, int port) { ...@@ -37,8 +37,7 @@ GURL UpgradeUrlToHttps(const GURL& original_url, int port) {
HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session) HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session)
: session_(session), : session_(session),
http_pipelined_host_pool_(this, NULL, http_pipelined_host_pool_(this, NULL) {}
session_->http_server_properties()) {}
HttpStreamFactoryImpl::~HttpStreamFactoryImpl() { HttpStreamFactoryImpl::~HttpStreamFactoryImpl() {
DCHECK(request_map_.empty()); DCHECK(request_map_.empty());
......
...@@ -436,7 +436,6 @@ ...@@ -436,7 +436,6 @@
'http/http_pipelined_connection_impl.cc', 'http/http_pipelined_connection_impl.cc',
'http/http_pipelined_connection_impl.h', 'http/http_pipelined_connection_impl.h',
'http/http_pipelined_host.h', 'http/http_pipelined_host.h',
'http/http_pipelined_host_capability.h',
'http/http_pipelined_host_impl.cc', 'http/http_pipelined_host_impl.cc',
'http/http_pipelined_host_impl.h', 'http/http_pipelined_host_impl.h',
'http/http_pipelined_host_pool.cc', 'http/http_pipelined_host_pool.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment