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

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

Issue 1018943002: Update HttpServerProperties::*AlternateProtocol* interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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
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 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 1487
1488 void HttpStreamFactoryImpl::Job::MaybeMarkAlternateProtocolBroken() { 1488 void HttpStreamFactoryImpl::Job::MaybeMarkAlternateProtocolBroken() {
1489 if (job_status_ == STATUS_RUNNING || other_job_status_ == STATUS_RUNNING) 1489 if (job_status_ == STATUS_RUNNING || other_job_status_ == STATUS_RUNNING)
1490 return; 1490 return;
1491 1491
1492 bool is_alternate_protocol_job = original_url_.get() != NULL; 1492 bool is_alternate_protocol_job = original_url_.get() != NULL;
1493 if (is_alternate_protocol_job) { 1493 if (is_alternate_protocol_job) {
1494 if (job_status_ == STATUS_BROKEN && other_job_status_ == STATUS_SUCCEEDED) { 1494 if (job_status_ == STATUS_BROKEN && other_job_status_ == STATUS_SUCCEEDED) {
1495 HistogramBrokenAlternateProtocolLocation( 1495 HistogramBrokenAlternateProtocolLocation(
1496 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_ALT); 1496 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_ALT);
1497 session_->http_server_properties()->SetBrokenAlternateProtocol( 1497 session_->http_server_properties()->MarkAlternativeServiceBroken(
1498 HostPortPair::FromURL(*original_url_)); 1498 alternative_service_);
1499 } 1499 }
1500 return; 1500 return;
1501 } 1501 }
1502 1502
1503 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { 1503 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) {
1504 HistogramBrokenAlternateProtocolLocation( 1504 HistogramBrokenAlternateProtocolLocation(
1505 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); 1505 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN);
1506 session_->http_server_properties()->SetBrokenAlternateProtocol( 1506 session_->http_server_properties()->MarkAlternativeServiceBroken(
1507 HostPortPair::FromURL(request_info_.url)); 1507 other_job_alternative_service_);
1508 } 1508 }
1509 } 1509 }
1510 1510
1511 } // namespace net 1511 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698