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 25 matching lines...) Expand all Loading... |
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 |
44 class Delegate { | 44 class Delegate { |
45 public: | 45 public: |
46 virtual ~Delegate() {} | |
47 | |
48 // Called when a pipelined host has no outstanding requests on any of its | 46 // Called when a pipelined host has no outstanding requests on any of its |
49 // pipelined connections. | 47 // pipelined connections. |
50 virtual void OnHostIdle(HttpPipelinedHost* host) = 0; | 48 virtual void OnHostIdle(HttpPipelinedHost* host) = 0; |
51 | 49 |
52 // Called when a pipelined host has newly available pipeline capacity, like | 50 // Called when a pipelined host has newly available pipeline capacity, like |
53 // when a request completes. | 51 // when a request completes. |
54 virtual void OnHostHasAdditionalCapacity(HttpPipelinedHost* host) = 0; | 52 virtual void OnHostHasAdditionalCapacity(HttpPipelinedHost* host) = 0; |
55 | 53 |
56 // Called when a host determines if pipelining can be used. | 54 // Called when a host determines if pipelining can be used. |
57 virtual void OnHostDeterminedCapability( | 55 virtual void OnHostDeterminedCapability( |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual const Key& GetKey() const = 0; | 93 virtual const Key& GetKey() const = 0; |
96 | 94 |
97 // Creates a Value summary of this host's pipelines. Caller assumes | 95 // Creates a Value summary of this host's pipelines. Caller assumes |
98 // ownership of the returned Value. | 96 // ownership of the returned Value. |
99 virtual base::Value* PipelineInfoToValue() const = 0; | 97 virtual base::Value* PipelineInfoToValue() const = 0; |
100 }; | 98 }; |
101 | 99 |
102 } // namespace net | 100 } // namespace net |
103 | 101 |
104 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ | 102 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ |
OLD | NEW |