Index: net/http/http_pipelined_host.h |
diff --git a/net/http/http_pipelined_host.h b/net/http/http_pipelined_host.h |
index 14c0f098f85e0cf6602c603f54993e618ac7a799..24b6e3ad3a130d9ddbbf7c9404ad3fae246533d1 100644 |
--- a/net/http/http_pipelined_host.h |
+++ b/net/http/http_pipelined_host.h |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2012 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. |
@@ -6,6 +6,7 @@ |
#define NET_HTTP_HTTP_PIPELINED_HOST_H_ |
#pragma once |
+#include "net/base/host_port_pair.h" |
#include "net/base/net_export.h" |
#include "net/http/http_pipelined_connection.h" |
#include "net/http/http_pipelined_host_capability.h" |
@@ -28,6 +29,19 @@ struct SSLConfig; |
// assigns requests to the least loaded pipelined connection. |
class NET_EXPORT_PRIVATE HttpPipelinedHost { |
public: |
+ class NET_EXPORT_PRIVATE Key { |
+ public: |
+ Key(const HostPortPair& origin); |
+ |
+ // The host and port associated with this key. |
+ const HostPortPair& origin() const { return origin_; } |
+ |
+ bool operator<(const Key& rhs) const; |
+ |
+ private: |
+ const HostPortPair origin_; |
+ }; |
+ |
class Delegate { |
public: |
// Called when a pipelined host has no outstanding requests on any of its |
@@ -50,9 +64,10 @@ class NET_EXPORT_PRIVATE HttpPipelinedHost { |
// Returns a new HttpPipelinedHost. |
virtual HttpPipelinedHost* CreateNewHost( |
- Delegate* delegate, const HostPortPair& origin, |
+ Delegate* delegate, const Key& key, |
HttpPipelinedConnection::Factory* factory, |
- HttpPipelinedHostCapability capability) = 0; |
+ HttpPipelinedHostCapability capability, |
+ bool force_pipelining) = 0; |
}; |
virtual ~HttpPipelinedHost() {} |
@@ -75,13 +90,12 @@ class NET_EXPORT_PRIVATE HttpPipelinedHost { |
// requests. |
virtual bool IsExistingPipelineAvailable() const = 0; |
- // Returns the host and port associated with this class. |
- virtual const HostPortPair& origin() const = 0; |
+ // Returns a Key that uniquely identifies this host. |
+ virtual const Key& GetKey() const = 0; |
// Creates a Value summary of this host's pipelines. Caller assumes |
// ownership of the returned Value. |
virtual base::Value* PipelineInfoToValue() const = 0; |
- |
}; |
} // namespace net |