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

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: 18. Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 void HttpStreamFactoryImpl::Job::MaybeMarkAlternateProtocolBroken() { 1520 void HttpStreamFactoryImpl::Job::MaybeMarkAlternateProtocolBroken() {
1521 if (job_status_ == STATUS_RUNNING || other_job_status_ == STATUS_RUNNING) 1521 if (job_status_ == STATUS_RUNNING || other_job_status_ == STATUS_RUNNING)
1522 return; 1522 return;
1523 1523
1524 bool is_alternate_protocol_job = original_url_.get() != NULL; 1524 bool is_alternate_protocol_job = original_url_.get() != NULL;
1525 if (is_alternate_protocol_job) { 1525 if (is_alternate_protocol_job) {
1526 if (job_status_ == STATUS_BROKEN && other_job_status_ == STATUS_SUCCEEDED) { 1526 if (job_status_ == STATUS_BROKEN && other_job_status_ == STATUS_SUCCEEDED) {
1527 HistogramBrokenAlternateProtocolLocation( 1527 HistogramBrokenAlternateProtocolLocation(
1528 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_ALT); 1528 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_ALT);
1529 session_->http_server_properties()->SetBrokenAlternateProtocol( 1529 session_->http_server_properties()->SetBrokenAlternateProtocol(
1530 HostPortPair::FromURL(*original_url_)); 1530 HostPortPair::FromURL(*original_url_), alternate_protocol_);
1531 } 1531 }
1532 return; 1532 return;
1533 } 1533 }
1534 1534
1535 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { 1535 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) {
1536 HistogramBrokenAlternateProtocolLocation( 1536 HistogramBrokenAlternateProtocolLocation(
1537 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); 1537 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN);
1538 session_->http_server_properties()->SetBrokenAlternateProtocol( 1538 session_->http_server_properties()->SetBrokenAlternateProtocol(
1539 HostPortPair::FromURL(request_info_.url)); 1539 HostPortPair::FromURL(request_info_.url),
1540 other_job_alternate_protocol_);
1540 } 1541 }
1541 } 1542 }
1542 1543
1543 } // namespace net 1544 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698