Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: net/http/http_pipelined_host_impl.cc

Issue 8833003: Revert 113315 (speculative revert for http://crbug.com/106657) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_pipelined_host_impl.h ('k') | net/http/http_pipelined_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_pipelined_host_impl.cc
===================================================================
--- net/http/http_pipelined_host_impl.cc (revision 113337)
+++ net/http/http_pipelined_host_impl.cc (working copy)
@@ -34,7 +34,7 @@
HttpPipelinedHost::Delegate* delegate,
const HostPortPair& origin,
HttpPipelinedConnection::Factory* factory,
- HttpPipelinedHostCapability capability)
+ Capability capability)
: delegate_(delegate),
origin_(origin),
factory_(factory),
@@ -54,7 +54,7 @@
const ProxyInfo& used_proxy_info,
const BoundNetLog& net_log,
bool was_npn_negotiated) {
- if (capability_ == PIPELINE_INCAPABLE) {
+ if (capability_ == INCAPABLE) {
return NULL;
}
HttpPipelinedConnection* pipeline = factory_->CreateNewPipeline(
@@ -124,21 +124,21 @@
switch (feedback) {
case HttpPipelinedConnection::OK:
++pipelines_[pipeline].num_successes;
- if (capability_ == PIPELINE_UNKNOWN) {
- capability_ = PIPELINE_PROBABLY_CAPABLE;
+ if (capability_ == UNKNOWN) {
+ capability_ = PROBABLY_CAPABLE;
NotifyAllPipelinesHaveCapacity();
- } else if (capability_ == PIPELINE_PROBABLY_CAPABLE &&
+ } else if (capability_ == PROBABLY_CAPABLE &&
pipelines_[pipeline].num_successes >=
kNumKnownSuccessesThreshold) {
- capability_ = PIPELINE_CAPABLE;
- delegate_->OnHostDeterminedCapability(this, PIPELINE_CAPABLE);
+ capability_ = CAPABLE;
+ delegate_->OnHostDeterminedCapability(this, CAPABLE);
}
break;
case HttpPipelinedConnection::PIPELINE_SOCKET_ERROR:
case HttpPipelinedConnection::OLD_HTTP_VERSION:
- capability_ = PIPELINE_INCAPABLE;
- delegate_->OnHostDeterminedCapability(this, PIPELINE_INCAPABLE);
+ capability_ = INCAPABLE;
+ delegate_->OnHostDeterminedCapability(this, INCAPABLE);
break;
case HttpPipelinedConnection::MUST_CLOSE_CONNECTION:
@@ -149,15 +149,15 @@
int HttpPipelinedHostImpl::GetPipelineCapacity() const {
int capacity = 0;
switch (capability_) {
- case PIPELINE_CAPABLE:
- case PIPELINE_PROBABLY_CAPABLE:
+ case CAPABLE:
+ case PROBABLY_CAPABLE:
capacity = max_pipeline_depth();
break;
- case PIPELINE_INCAPABLE:
+ case INCAPABLE:
CHECK(false);
- case PIPELINE_UNKNOWN:
+ case UNKNOWN:
capacity = 1;
break;
@@ -169,7 +169,7 @@
bool HttpPipelinedHostImpl::CanPipelineAcceptRequests(
HttpPipelinedConnection* pipeline) const {
- return capability_ != PIPELINE_INCAPABLE &&
+ return capability_ != INCAPABLE &&
pipeline->usable() &&
pipeline->active() &&
pipeline->depth() < GetPipelineCapacity();
« no previous file with comments | « net/http/http_pipelined_host_impl.h ('k') | net/http/http_pipelined_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698