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

Unified Diff: net/http/http_stream_factory_impl_request.cc

Issue 245663003: Do not mark alternate-protocol broken unless the main job succeeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix warning 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_job.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('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 1eb8e51f57b9362258c1aa285e87fe1f813f2dbb..38bc03c6bfb917d2b8407576f61a2617cbf6e3ec 100644
--- a/net/http/http_stream_factory_impl_request.cc
+++ b/net/http/http_stream_factory_impl_request.cc
@@ -146,6 +146,9 @@ void HttpStreamFactoryImpl::Request::OnStreamFailed(
if (jobs_.size() > 1) {
jobs_.erase(job);
factory_->request_map_.erase(job);
+ // Notify all the other jobs that this one failed.
+ for (std::set<Job*>::iterator it = jobs_.begin(); it != jobs_.end(); ++it)
+ (*it)->MarkOtherJobComplete(*job);
delete job;
return;
} else {
@@ -385,6 +388,12 @@ void HttpStreamFactoryImpl::Request::OnJobSucceeded(Job* job) {
if (!bound_job_.get()) {
if (jobs_.size() > 1)
job->ReportJobSuccededForRequest();
+ // Notify all the other jobs that this one succeeded.
+ for (std::set<Job*>::iterator it = jobs_.begin(); it != jobs_.end(); ++it) {
+ if (*it != job) {
+ (*it)->MarkOtherJobComplete(*job);
+ }
+ }
// We may have other jobs in |jobs_|. For example, if we start multiple jobs
// for Alternate-Protocol.
OrphanJobsExcept(job);
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698