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

Side by Side Diff: net/url_request/url_request.cc

Issue 578553004: Remove the "snionly" concept from the HSTS preload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... Created 6 years, 2 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/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 NetLog::IntegerCallback("priority", priority_)); 1041 NetLog::IntegerCallback("priority", priority_));
1042 job_->SetPriority(priority_); 1042 job_->SetPriority(priority_);
1043 } 1043 }
1044 } 1044 }
1045 1045
1046 bool URLRequest::GetHSTSRedirect(GURL* redirect_url) const { 1046 bool URLRequest::GetHSTSRedirect(GURL* redirect_url) const {
1047 const GURL& url = this->url(); 1047 const GURL& url = this->url();
1048 if (!url.SchemeIs("http")) 1048 if (!url.SchemeIs("http"))
1049 return false; 1049 return false;
1050 TransportSecurityState* state = context()->transport_security_state(); 1050 TransportSecurityState* state = context()->transport_security_state();
1051 if (state && 1051 if (state && state->ShouldUpgradeToSSL(url.host())) {
1052 state->ShouldUpgradeToSSL(
1053 url.host(),
1054 SSLConfigService::IsSNIAvailable(context()->ssl_config_service()))) {
1055 url::Replacements<char> replacements; 1052 url::Replacements<char> replacements;
1056 const char kNewScheme[] = "https"; 1053 const char kNewScheme[] = "https";
1057 replacements.SetScheme(kNewScheme, url::Component(0, strlen(kNewScheme))); 1054 replacements.SetScheme(kNewScheme, url::Component(0, strlen(kNewScheme)));
1058 *redirect_url = url.ReplaceComponents(replacements); 1055 *redirect_url = url.ReplaceComponents(replacements);
1059 return true; 1056 return true;
1060 } 1057 }
1061 return false; 1058 return false;
1062 } 1059 }
1063 1060
1064 void URLRequest::NotifyAuthRequired(AuthChallengeInfo* auth_info) { 1061 void URLRequest::NotifyAuthRequired(AuthChallengeInfo* auth_info) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 new base::debug::StackTrace(NULL, 0); 1225 new base::debug::StackTrace(NULL, 0);
1229 *stack_trace_copy = stack_trace; 1226 *stack_trace_copy = stack_trace;
1230 stack_trace_.reset(stack_trace_copy); 1227 stack_trace_.reset(stack_trace_copy);
1231 } 1228 }
1232 1229
1233 const base::debug::StackTrace* URLRequest::stack_trace() const { 1230 const base::debug::StackTrace* URLRequest::stack_trace() const {
1234 return stack_trace_.get(); 1231 return stack_trace_.get();
1235 } 1232 }
1236 1233
1237 } // namespace net 1234 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/fraudulent_certificate_reporter.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698