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

Side by Side Diff: content/browser/ssl/ssl_policy.cc

Issue 508823009: Mark SHA-1 as deprecated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_verify_result_sha1
Patch Set: Moar work 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 "content/browser/ssl/ssl_policy.h" 5 #include "content/browser/ssl/ssl_policy.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 backend_->HostRanInsecureContent(GURL(security_origin).host(), 103 backend_->HostRanInsecureContent(GURL(security_origin).host(),
104 site_instance->GetProcess()->GetID()); 104 site_instance->GetProcess()->GetID());
105 } 105 }
106 106
107 void SSLPolicy::OnRequestStarted(SSLRequestInfo* info) { 107 void SSLPolicy::OnRequestStarted(SSLRequestInfo* info) {
108 // TODO(abarth): This mechanism is wrong. What we should be doing is sending 108 // TODO(abarth): This mechanism is wrong. What we should be doing is sending
109 // this information back through WebKit and out some FrameLoaderClient 109 // this information back through WebKit and out some FrameLoaderClient
110 // methods. 110 // methods.
111 111
112 if (net::IsCertStatusError(info->ssl_cert_status())) 112 if (net::IsCertStatusError(info->ssl_cert_status()) &&
113 !net::IsCertStatusMinorError(info->ssl_cert_status())) {
Ryan Sleevi 2014/09/24 02:50:36 This allows the following three errors to NOT be t
palmer 2014/09/26 19:15:04 Agree.
113 backend_->HostRanInsecureContent(info->url().host(), info->child_id()); 114 backend_->HostRanInsecureContent(info->url().host(), info->child_id());
115 }
114 } 116 }
115 117
116 void SSLPolicy::UpdateEntry(NavigationEntryImpl* entry, 118 void SSLPolicy::UpdateEntry(NavigationEntryImpl* entry,
117 WebContentsImpl* web_contents) { 119 WebContentsImpl* web_contents) {
118 DCHECK(entry); 120 DCHECK(entry);
119 121
120 InitializeEntryIfNeeded(entry); 122 InitializeEntryIfNeeded(entry);
121 123
122 if (!entry->GetURL().SchemeIsSecure()) 124 if (!entry->GetURL().SchemeIsSecure())
123 return; 125 return;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; 233 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED;
232 } 234 }
233 235
234 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { 236 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {
235 GURL parsed_origin(origin); 237 GURL parsed_origin(origin);
236 if (parsed_origin.SchemeIsSecure()) 238 if (parsed_origin.SchemeIsSecure())
237 backend_->HostRanInsecureContent(parsed_origin.host(), pid); 239 backend_->HostRanInsecureContent(parsed_origin.host(), pid);
238 } 240 }
239 241
240 } // namespace content 242 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698