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