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

Unified Diff: net/http/http_pipelined_host_pool.h

Issue 9433015: Add a force pipelining option to load flags. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix build on other platforms Created 8 years, 10 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/http/http_pipelined_host_pool.h
diff --git a/net/http/http_pipelined_host_pool.h b/net/http/http_pipelined_host_pool.h
index 7cebbfe3ed878937e3e9bdbc8b0483d5866f21fc..6a2f88b6b706622b47e6789107100ece6c613c09 100644
--- a/net/http/http_pipelined_host_pool.h
+++ b/net/http/http_pipelined_host_pool.h
@@ -35,7 +35,7 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool
// Called when a HttpPipelinedHost has new capacity. Attempts to allocate
// any pending pipeline-capable requests to pipelines.
virtual void OnHttpPipelinedHostHasAdditionalCapacity(
- const HostPortPair& origin) = 0;
+ HttpPipelinedHost* host) = 0;
};
HttpPipelinedHostPool(Delegate* delegate,
@@ -43,14 +43,14 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool
HttpServerProperties* http_server_properties_);
virtual ~HttpPipelinedHostPool();
- // Returns true if pipelining might work for |origin|. Generally, this returns
- // true, unless |origin| is known to have failed pipelining recently.
- bool IsHostEligibleForPipelining(const HostPortPair& origin);
+ // Returns true if pipelining might work for |key|. Generally, this returns
+ // true, unless |key| is known to have failed pipelining recently.
+ bool IsKeyEligibleForPipelining(const HttpPipelinedHost::Key& key);
// Constructs a new pipeline on |connection| and returns a new
// HttpPipelinedStream that uses it.
HttpPipelinedStream* CreateStreamOnNewPipeline(
- const HostPortPair& origin,
+ const HttpPipelinedHost::Key& key,
ClientSocketHandle* connection,
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
@@ -61,11 +61,11 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool
// Tries to find an existing pipeline with capacity for a new request. If
// successful, returns a new stream on that pipeline. Otherwise, returns NULL.
HttpPipelinedStream* CreateStreamOnExistingPipeline(
- const HostPortPair& origin);
+ const HttpPipelinedHost::Key& key);
- // Returns true if a pipelined connection already exists for this origin and
+ // Returns true if a pipelined connection already exists for |key| and
// can accept new requests.
- bool IsExistingPipelineAvailableForOrigin(const HostPortPair& origin);
+ bool IsExistingPipelineAvailableForKey(const HttpPipelinedHost::Key& key);
// Callbacks for HttpPipelinedHost.
virtual void OnHostIdle(HttpPipelinedHost* host) OVERRIDE;
@@ -81,9 +81,9 @@ class NET_EXPORT_PRIVATE HttpPipelinedHostPool
base::Value* PipelineInfoToValue() const;
private:
- typedef std::map<const HostPortPair, HttpPipelinedHost*> HostMap;
+ typedef std::map<HttpPipelinedHost::Key, HttpPipelinedHost*> HostMap;
- HttpPipelinedHost* GetPipelinedHost(const HostPortPair& origin,
+ HttpPipelinedHost* GetPipelinedHost(const HttpPipelinedHost::Key& key,
bool create_if_not_found);
Delegate* delegate_;

Powered by Google App Engine
This is Rietveld 408576698