Index: net/http/http_pipelined_host_impl.cc |
diff --git a/net/http/http_pipelined_host_impl.cc b/net/http/http_pipelined_host_impl.cc |
index 2501476387f31c8a8e7c8a731b4a24aedd3fcd96..8690f59f213327e8ca4f94e915ccd9ab3a725cfa 100644 |
--- a/net/http/http_pipelined_host_impl.cc |
+++ b/net/http/http_pipelined_host_impl.cc |
@@ -34,7 +34,7 @@ HttpPipelinedHostImpl::HttpPipelinedHostImpl( |
HttpPipelinedHost::Delegate* delegate, |
const HostPortPair& origin, |
HttpPipelinedConnection::Factory* factory, |
- Capability capability) |
+ HttpPipelinedHostCapability capability) |
: delegate_(delegate), |
origin_(origin), |
factory_(factory), |
@@ -54,7 +54,7 @@ HttpPipelinedStream* HttpPipelinedHostImpl::CreateStreamOnNewPipeline( |
const ProxyInfo& used_proxy_info, |
const BoundNetLog& net_log, |
bool was_npn_negotiated) { |
- if (capability_ == INCAPABLE) { |
+ if (capability_ == PIPELINE_INCAPABLE) { |
return NULL; |
} |
HttpPipelinedConnection* pipeline = factory_->CreateNewPipeline( |
@@ -113,7 +113,7 @@ void HttpPipelinedHostImpl::OnPipelineHasCapacity( |
HttpPipelinedConnection* pipeline) { |
CHECK(ContainsKey(pipelines_, pipeline)); |
if (pipeline->usable() && |
- capability_ != INCAPABLE && |
+ capability_ != PIPELINE_INCAPABLE && |
pipeline->depth() < GetPipelineCapacity()) { |
delegate_->OnHostHasAdditionalCapacity(this); |
} |
@@ -130,24 +130,24 @@ void HttpPipelinedHostImpl::OnPipelineFeedback( |
switch (feedback) { |
case HttpPipelinedConnection::OK: |
++pipelines_[pipeline].num_successes; |
- if (capability_ == UNKNOWN) { |
- capability_ = PROBABLY_CAPABLE; |
+ if (capability_ == PIPELINE_UNKNOWN) { |
+ capability_ = PIPELINE_PROBABLY_CAPABLE; |
for (PipelineInfoMap::iterator it = pipelines_.begin(); |
it != pipelines_.end(); ++it) { |
OnPipelineHasCapacity(it->first); |
} |
- } else if (capability_ == PROBABLY_CAPABLE && |
+ } else if (capability_ == PIPELINE_PROBABLY_CAPABLE && |
pipelines_[pipeline].num_successes >= |
kNumKnownSuccessesThreshold) { |
- capability_ = CAPABLE; |
- delegate_->OnHostDeterminedCapability(this, CAPABLE); |
+ capability_ = PIPELINE_CAPABLE; |
+ delegate_->OnHostDeterminedCapability(this, PIPELINE_CAPABLE); |
} |
break; |
case HttpPipelinedConnection::PIPELINE_SOCKET_ERROR: |
case HttpPipelinedConnection::OLD_HTTP_VERSION: |
- capability_ = INCAPABLE; |
- delegate_->OnHostDeterminedCapability(this, INCAPABLE); |
+ capability_ = PIPELINE_INCAPABLE; |
+ delegate_->OnHostDeterminedCapability(this, PIPELINE_INCAPABLE); |
break; |
case HttpPipelinedConnection::MUST_CLOSE_CONNECTION: |
@@ -158,15 +158,15 @@ void HttpPipelinedHostImpl::OnPipelineFeedback( |
int HttpPipelinedHostImpl::GetPipelineCapacity() const { |
int capacity = 0; |
switch (capability_) { |
- case CAPABLE: |
- case PROBABLY_CAPABLE: |
+ case PIPELINE_CAPABLE: |
+ case PIPELINE_PROBABLY_CAPABLE: |
capacity = max_pipeline_depth(); |
break; |
- case INCAPABLE: |
+ case PIPELINE_INCAPABLE: |
CHECK(false); |
- case UNKNOWN: |
+ case PIPELINE_UNKNOWN: |
capacity = 1; |
break; |