| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_IMPL_H_ | 5 #ifndef NET_HTTP_HTTP_PIPELINED_HOST_IMPL_H_ |
| 6 #define NET_HTTP_HTTP_PIPELINED_HOST_IMPL_H_ | 6 #define NET_HTTP_HTTP_PIPELINED_HOST_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 HttpPipelinedConnection* pipeline) OVERRIDE; | 57 HttpPipelinedConnection* pipeline) OVERRIDE; |
| 58 | 58 |
| 59 virtual void OnPipelineFeedback( | 59 virtual void OnPipelineFeedback( |
| 60 HttpPipelinedConnection* pipeline, | 60 HttpPipelinedConnection* pipeline, |
| 61 HttpPipelinedConnection::Feedback feedback) OVERRIDE; | 61 HttpPipelinedConnection::Feedback feedback) OVERRIDE; |
| 62 | 62 |
| 63 virtual const HostPortPair& origin() const OVERRIDE; | 63 virtual const HostPortPair& origin() const OVERRIDE; |
| 64 | 64 |
| 65 // Returns the maximum number of in-flight pipelined requests we'll allow on a | 65 // Returns the maximum number of in-flight pipelined requests we'll allow on a |
| 66 // single connection. | 66 // single connection. |
| 67 NET_EXPORT_PRIVATE static int max_pipeline_depth() { return 3; } | 67 static int max_pipeline_depth() { return 3; } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 struct PipelineInfo { | 70 struct PipelineInfo { |
| 71 PipelineInfo(); | 71 PipelineInfo(); |
| 72 | 72 |
| 73 int num_successes; | 73 int num_successes; |
| 74 }; | 74 }; |
| 75 typedef std::map<HttpPipelinedConnection*, PipelineInfo> PipelineInfoMap; | 75 typedef std::map<HttpPipelinedConnection*, PipelineInfo> PipelineInfoMap; |
| 76 | 76 |
| 77 // Called when a pipeline is empty and there are no pending requests. Closes | 77 // Called when a pipeline is empty and there are no pending requests. Closes |
| (...skipping 12 matching lines...) Expand all Loading... |
| 90 PipelineInfoMap pipelines_; | 90 PipelineInfoMap pipelines_; |
| 91 scoped_ptr<HttpPipelinedConnection::Factory> factory_; | 91 scoped_ptr<HttpPipelinedConnection::Factory> factory_; |
| 92 Capability capability_; | 92 Capability capability_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedHostImpl); | 94 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedHostImpl); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace net | 97 } // namespace net |
| 98 | 98 |
| 99 #endif // NET_HTTP_HTTP_PIPELINED_HOST_IMPL_H_ | 99 #endif // NET_HTTP_HTTP_PIPELINED_HOST_IMPL_H_ |
| OLD | NEW |