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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 10095024: Refuse to pipeline frames, prefetches, and downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index f3ebf4a6027ccd65f58c6889cc64bd549dc67b5d..3eb3221d945c0bb59d83aba3066e09322b90c422 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -902,13 +902,13 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() {
if (!using_spdy_) {
bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) &&
request_info_.url.SchemeIs("http");
- // TODO(simonjam): Support proxies.
if (stream_factory_->http_pipelined_host_pool_.
IsExistingPipelineAvailableForKey(*http_pipelining_key_.get())) {
stream_.reset(stream_factory_->http_pipelined_host_pool_.
CreateStreamOnExistingPipeline(
*http_pipelining_key_.get()));
CHECK(stream_.get());
+ // TODO(simonjam): Support proxies.
mmenke 2012/04/19 14:40:20 nit: This should be indented two spaces. Suggest
James Simonsen 2012/04/26 19:17:02 Done.
} else if (!using_proxy && IsRequestEligibleForPipelining()) {
stream_.reset(
stream_factory_->http_pipelined_host_pool_.CreateStreamOnNewPipeline(
@@ -1246,6 +1246,11 @@ bool HttpStreamFactoryImpl::Job::IsRequestEligibleForPipelining() {
if (request_info_.method != "GET" && request_info_.method != "HEAD") {
return false;
}
+ if (request_info_.load_flags &
+ (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH |
+ net::LOAD_IS_DOWNLOAD)) {
mmenke 2012/04/19 14:40:20 nit: Think a comment might be nice. While most d
mmenke 2012/04/19 14:40:20 Might be nice to have a regression test for this a
James Simonsen 2012/04/26 19:17:02 Done.
James Simonsen 2012/04/26 19:17:02 Done.
+ return false;
+ }
return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining(
*http_pipelining_key_.get());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698