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

Unified Diff: net/http/http_pipelined_host.h

Issue 9433015: Add a force pipelining option to load flags. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge 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
« no previous file with comments | « net/http/http_pipelined_connection_impl.h ('k') | net/http/http_pipelined_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/http/http_pipelined_connection_impl.h ('k') | net/http/http_pipelined_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698