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

Unified Diff: trunk/src/net/url_request/url_request.cc

Issue 24251011: Revert 224269 "Don't persist HPKP if PrivacyMode is enabled." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/net/socket_stream/socket_stream_job.cc ('k') | trunk/src/net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/url_request/url_request.cc
===================================================================
--- trunk/src/net/url_request/url_request.cc (revision 224274)
+++ trunk/src/net/url_request/url_request.cc (working copy)
@@ -919,25 +919,20 @@
bool URLRequest::GetHSTSRedirect(GURL* redirect_url) const {
const GURL& url = this->url();
- if (redirect_url && !url.SchemeIs("http"))
+ if (!url.SchemeIs("http"))
return false;
TransportSecurityState::DomainState domain_state;
- bool allow_dynamic_state =
- !(load_flags_ & LOAD_DO_NOT_SEND_COOKIES) && CanGetCookies(CookieList());
if (context()->transport_security_state() &&
context()->transport_security_state()->GetDomainState(
url.host(),
SSLConfigService::IsSNIAvailable(context()->ssl_config_service()),
- allow_dynamic_state,
&domain_state) &&
domain_state.ShouldUpgradeToSSL()) {
- if (redirect_url) {
- url_canon::Replacements<char> replacements;
- const char kNewScheme[] = "https";
- replacements.SetScheme(kNewScheme,
- url_parse::Component(0, strlen(kNewScheme)));
- *redirect_url = url.ReplaceComponents(replacements);
- }
+ url_canon::Replacements<char> replacements;
+ const char kNewScheme[] = "https";
+ replacements.SetScheme(kNewScheme,
+ url_parse::Component(0, strlen(kNewScheme)));
+ *redirect_url = url.ReplaceComponents(replacements);
return true;
}
return false;
« no previous file with comments | « trunk/src/net/socket_stream/socket_stream_job.cc ('k') | trunk/src/net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698