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 #include "net/http/http_pipelined_host_impl.h" | 5 #include "net/http/http_pipelined_host_impl.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "net/http/http_pipelined_connection_impl.h" | 9 #include "net/http/http_pipelined_connection_impl.h" |
10 #include "net/http/http_pipelined_stream.h" | 10 #include "net/http/http_pipelined_stream.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 int HttpPipelinedHostImpl::GetPipelineCapacity() const { | 148 int HttpPipelinedHostImpl::GetPipelineCapacity() const { |
149 int capacity = 0; | 149 int capacity = 0; |
150 switch (capability_) { | 150 switch (capability_) { |
151 case PIPELINE_CAPABLE: | 151 case PIPELINE_CAPABLE: |
152 case PIPELINE_PROBABLY_CAPABLE: | 152 case PIPELINE_PROBABLY_CAPABLE: |
153 capacity = max_pipeline_depth(); | 153 capacity = max_pipeline_depth(); |
154 break; | 154 break; |
155 | 155 |
156 case PIPELINE_INCAPABLE: | 156 case PIPELINE_INCAPABLE: |
157 CHECK(false); | 157 CHECK(false); |
| 158 break; |
158 | 159 |
159 case PIPELINE_UNKNOWN: | 160 case PIPELINE_UNKNOWN: |
160 capacity = 1; | 161 capacity = 1; |
161 break; | 162 break; |
162 | 163 |
163 default: | 164 default: |
164 CHECK(false) << "Unkown pipeline capability: " << capability_; | 165 CHECK(false) << "Unkown pipeline capability: " << capability_; |
165 } | 166 } |
166 return capacity; | 167 return capacity; |
167 } | 168 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 list_value->Append(pipeline_dict); | 202 list_value->Append(pipeline_dict); |
202 } | 203 } |
203 return list_value; | 204 return list_value; |
204 } | 205 } |
205 | 206 |
206 HttpPipelinedHostImpl::PipelineInfo::PipelineInfo() | 207 HttpPipelinedHostImpl::PipelineInfo::PipelineInfo() |
207 : num_successes(0) { | 208 : num_successes(0) { |
208 } | 209 } |
209 | 210 |
210 } // namespace net | 211 } // namespace net |
OLD | NEW |