OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |