OLD | NEW |
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 Loading... |
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 |
OLD | NEW |