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

Unified Diff: net/http/http_stream_factory_impl_request.cc

Issue 275953002: Remove HTTP pipelining support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix line endings Created 6 years, 7 months 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_stream_factory_impl_request.h ('k') | net/net.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_request.cc
diff --git a/net/http/http_stream_factory_impl_request.cc b/net/http/http_stream_factory_impl_request.cc
index 38bc03c6bfb917d2b8407576f61a2617cbf6e3ec..9c494334123bc64c284a1f186e70a05b01bec69b 100644
--- a/net/http/http_stream_factory_impl_request.cc
+++ b/net/http/http_stream_factory_impl_request.cc
@@ -48,7 +48,6 @@ HttpStreamFactoryImpl::Request::~Request() {
factory_->request_map_.erase(*it);
RemoveRequestFromSpdySessionRequestMap();
- RemoveRequestFromHttpPipeliningRequestMap();
STLDeleteElements(&jobs_);
}
@@ -63,18 +62,6 @@ void HttpStreamFactoryImpl::Request::SetSpdySessionKey(
request_set.insert(this);
}
-bool HttpStreamFactoryImpl::Request::SetHttpPipeliningKey(
- const HttpPipelinedHost::Key& http_pipelining_key) {
- CHECK(!http_pipelining_key_.get());
- http_pipelining_key_.reset(new HttpPipelinedHost::Key(http_pipelining_key));
- bool was_new_key = !ContainsKey(factory_->http_pipelining_request_map_,
- http_pipelining_key);
- RequestVector& request_vector =
- factory_->http_pipelining_request_map_[http_pipelining_key];
- request_vector.push_back(this);
- return was_new_key;
-}
-
void HttpStreamFactoryImpl::Request::AttachJob(Job* job) {
DCHECK(job);
jobs_.insert(job);
@@ -131,16 +118,8 @@ void HttpStreamFactoryImpl::Request::OnStreamFailed(
int status,
const SSLConfig& used_ssl_config) {
DCHECK_NE(OK, status);
- // |job| should only be NULL if we're being canceled by a late bound
- // HttpPipelinedConnection (one that was not created by a job in our |jobs_|
- // set).
- if (!job) {
- DCHECK(!bound_job_.get());
- DCHECK(!jobs_.empty());
- // NOTE(willchan): We do *NOT* call OrphanJobs() here. The reason is because
- // we *WANT* to cancel the unnecessary Jobs from other requests if another
- // Job completes first.
- } else if (!bound_job_.get()) {
+ DCHECK(job);
+ if (!bound_job_.get()) {
// Hey, we've got other jobs! Maybe one of them will succeed, let's just
// ignore this failure.
if (jobs_.size() > 1) {
@@ -271,27 +250,6 @@ HttpStreamFactoryImpl::Request::RemoveRequestFromSpdySessionRequestMap() {
}
}
-void
-HttpStreamFactoryImpl::Request::RemoveRequestFromHttpPipeliningRequestMap() {
- if (http_pipelining_key_.get()) {
- HttpPipeliningRequestMap& http_pipelining_request_map =
- factory_->http_pipelining_request_map_;
- DCHECK(ContainsKey(http_pipelining_request_map, *http_pipelining_key_));
- RequestVector& request_vector =
- http_pipelining_request_map[*http_pipelining_key_];
- for (RequestVector::iterator it = request_vector.begin();
- it != request_vector.end(); ++it) {
- if (*it == this) {
- request_vector.erase(it);
- break;
- }
- }
- if (request_vector.empty())
- http_pipelining_request_map.erase(*http_pipelining_key_);
- http_pipelining_key_.reset();
- }
-}
-
void HttpStreamFactoryImpl::Request::OnNewSpdySessionReady(
Job* job,
scoped_ptr<HttpStream> stream,
@@ -359,7 +317,6 @@ void HttpStreamFactoryImpl::Request::OrphanJobsExcept(Job* job) {
void HttpStreamFactoryImpl::Request::OrphanJobs() {
RemoveRequestFromSpdySessionRequestMap();
- RemoveRequestFromHttpPipeliningRequestMap();
std::set<Job*> tmp;
tmp.swap(jobs_);
@@ -370,8 +327,7 @@ void HttpStreamFactoryImpl::Request::OrphanJobs() {
void HttpStreamFactoryImpl::Request::OnJobSucceeded(Job* job) {
// |job| should only be NULL if we're being serviced by a late bound
- // SpdySession or HttpPipelinedConnection (one that was not created by a job
- // in our |jobs_| set).
+ // SpdySession (one that was not created by a job in our |jobs_| set).
if (!job) {
DCHECK(!bound_job_.get());
DCHECK(!jobs_.empty());
« no previous file with comments | « net/http/http_stream_factory_impl_request.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698