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

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

Issue 2030023005: Disable AltSvc from insecure origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
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
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/quic/quic_network_transaction_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 #include <utility> 9 #include <utility>
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 was_npn_negotiated_(false), 211 was_npn_negotiated_(false),
212 protocol_negotiated_(kProtoUnknown), 212 protocol_negotiated_(kProtoUnknown),
213 num_streams_(0), 213 num_streams_(0),
214 spdy_session_direct_(false), 214 spdy_session_direct_(false),
215 job_status_(STATUS_RUNNING), 215 job_status_(STATUS_RUNNING),
216 other_job_status_(STATUS_RUNNING), 216 other_job_status_(STATUS_RUNNING),
217 stream_type_(HttpStreamRequest::BIDIRECTIONAL_STREAM), 217 stream_type_(HttpStreamRequest::BIDIRECTIONAL_STREAM),
218 ptr_factory_(this) { 218 ptr_factory_(this) {
219 DCHECK(stream_factory); 219 DCHECK(stream_factory);
220 DCHECK(session); 220 DCHECK(session);
221 if (IsSpdyAlternative() &&
222 !session_->params().enable_alternative_service_for_insecure_origins) {
223 DCHECK(origin_url_.SchemeIs("https"));
224 }
221 if (IsQuicAlternative()) { 225 if (IsQuicAlternative()) {
222 DCHECK(session_->params().enable_quic); 226 DCHECK(session_->params().enable_quic);
223 using_quic_ = true; 227 using_quic_ = true;
224 } 228 }
225 } 229 }
226 230
227 HttpStreamFactoryImpl::Job::~Job() { 231 HttpStreamFactoryImpl::Job::~Job() {
228 net_log_.EndEvent(NetLog::TYPE_HTTP_STREAM_JOB); 232 net_log_.EndEvent(NetLog::TYPE_HTTP_STREAM_JOB);
229 233
230 // When we're in a partially constructed state, waiting for the user to 234 // When we're in a partially constructed state, waiting for the user to
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 if (connection_->socket()) { 1812 if (connection_->socket()) {
1809 ConnectionAttempts socket_attempts; 1813 ConnectionAttempts socket_attempts;
1810 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1814 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1811 request_->AddConnectionAttempts(socket_attempts); 1815 request_->AddConnectionAttempts(socket_attempts);
1812 } else { 1816 } else {
1813 request_->AddConnectionAttempts(connection_->connection_attempts()); 1817 request_->AddConnectionAttempts(connection_->connection_attempts());
1814 } 1818 }
1815 } 1819 }
1816 1820
1817 } // namespace net 1821 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698