OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_HTTP_HTTP_PIPELINED_HOST_H_ | 5 #ifndef NET_HTTP_HTTP_PIPELINED_HOST_H_ |
6 #define NET_HTTP_HTTP_PIPELINED_HOST_H_ | 6 #define NET_HTTP_HTTP_PIPELINED_HOST_H_ |
7 | 7 |
8 #include "net/base/host_port_pair.h" | 8 #include "net/base/host_port_pair.h" |
9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
10 #include "net/http/http_pipelined_connection.h" | 10 #include "net/http/http_pipelined_connection.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class ProxyInfo; | 23 class ProxyInfo; |
24 struct SSLConfig; | 24 struct SSLConfig; |
25 | 25 |
26 // Manages all of the pipelining state for specific host with active pipelined | 26 // Manages all of the pipelining state for specific host with active pipelined |
27 // HTTP requests. Manages connection jobs, constructs pipelined streams, and | 27 // HTTP requests. Manages connection jobs, constructs pipelined streams, and |
28 // assigns requests to the least loaded pipelined connection. | 28 // assigns requests to the least loaded pipelined connection. |
29 class NET_EXPORT_PRIVATE HttpPipelinedHost { | 29 class NET_EXPORT_PRIVATE HttpPipelinedHost { |
30 public: | 30 public: |
31 class NET_EXPORT_PRIVATE Key { | 31 class NET_EXPORT_PRIVATE Key { |
32 public: | 32 public: |
33 Key(const HostPortPair& origin); | 33 explicit Key(const HostPortPair& origin); |
34 | 34 |
35 // The host and port associated with this key. | 35 // The host and port associated with this key. |
36 const HostPortPair& origin() const { return origin_; } | 36 const HostPortPair& origin() const { return origin_; } |
37 | 37 |
38 bool operator<(const Key& rhs) const; | 38 bool operator<(const Key& rhs) const; |
39 | 39 |
40 private: | 40 private: |
41 const HostPortPair origin_; | 41 const HostPortPair origin_; |
42 }; | 42 }; |
43 | 43 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 virtual const Key& GetKey() const = 0; | 93 virtual const Key& GetKey() const = 0; |
94 | 94 |
95 // Creates a Value summary of this host's pipelines. Caller assumes | 95 // Creates a Value summary of this host's pipelines. Caller assumes |
96 // ownership of the returned Value. | 96 // ownership of the returned Value. |
97 virtual base::Value* PipelineInfoToValue() const = 0; | 97 virtual base::Value* PipelineInfoToValue() const = 0; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace net | 100 } // namespace net |
101 | 101 |
102 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ | 102 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ |
OLD | NEW |