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

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

Issue 2026863002: Disable AltSvc from insecure origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 #include <utility> 9 #include <utility>
10 10
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 was_npn_negotiated_(false), 210 was_npn_negotiated_(false),
211 protocol_negotiated_(kProtoUnknown), 211 protocol_negotiated_(kProtoUnknown),
212 num_streams_(0), 212 num_streams_(0),
213 spdy_session_direct_(false), 213 spdy_session_direct_(false),
214 job_status_(STATUS_RUNNING), 214 job_status_(STATUS_RUNNING),
215 other_job_status_(STATUS_RUNNING), 215 other_job_status_(STATUS_RUNNING),
216 stream_type_(HttpStreamRequest::BIDIRECTIONAL_STREAM), 216 stream_type_(HttpStreamRequest::BIDIRECTIONAL_STREAM),
217 ptr_factory_(this) { 217 ptr_factory_(this) {
218 DCHECK(stream_factory); 218 DCHECK(stream_factory);
219 DCHECK(session); 219 DCHECK(session);
220 if (IsSpdyAlternative() &&
221 !session_->params().enable_alternative_service_for_insecure_origins) {
222 DCHECK(origin_url_.SchemeIs("https"));
223 }
220 if (IsQuicAlternative()) { 224 if (IsQuicAlternative()) {
221 DCHECK(session_->params().enable_quic); 225 DCHECK(session_->params().enable_quic);
222 using_quic_ = true; 226 using_quic_ = true;
223 } 227 }
224 } 228 }
225 229
226 HttpStreamFactoryImpl::Job::~Job() { 230 HttpStreamFactoryImpl::Job::~Job() {
227 net_log_.EndEvent(NetLog::TYPE_HTTP_STREAM_JOB); 231 net_log_.EndEvent(NetLog::TYPE_HTTP_STREAM_JOB);
228 232
229 // When we're in a partially constructed state, waiting for the user to 233 // When we're in a partially constructed state, waiting for the user to
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 if (connection_->socket()) { 1803 if (connection_->socket()) {
1800 ConnectionAttempts socket_attempts; 1804 ConnectionAttempts socket_attempts;
1801 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1805 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1802 request_->AddConnectionAttempts(socket_attempts); 1806 request_->AddConnectionAttempts(socket_attempts);
1803 } else { 1807 } else {
1804 request_->AddConnectionAttempts(connection_->connection_attempts()); 1808 request_->AddConnectionAttempts(connection_->connection_attempts());
1805 } 1809 }
1806 } 1810 }
1807 1811
1808 } // namespace net 1812 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698