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

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

Issue 2226363002: Track subresources with cert errors separately from mixed content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_backend.h" 5 #include "content/browser/ssl/ssl_policy_backend.h"
6 6
7 #include "content/browser/frame_host/navigation_controller_impl.h" 7 #include "content/browser/frame_host/navigation_controller_impl.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/ssl_host_state_delegate.h" 9 #include "content/public/browser/ssl_host_state_delegate.h"
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 bool SSLPolicyBackend::DidHostRunInsecureContent(const std::string& host, 27 bool SSLPolicyBackend::DidHostRunInsecureContent(const std::string& host,
28 int pid) const { 28 int pid) const {
29 if (!ssl_host_state_delegate_) 29 if (!ssl_host_state_delegate_)
30 return false; 30 return false;
31 31
32 return ssl_host_state_delegate_->DidHostRunInsecureContent( 32 return ssl_host_state_delegate_->DidHostRunInsecureContent(
33 host, pid, SSLHostStateDelegate::MIXED_CONTENT); 33 host, pid, SSLHostStateDelegate::MIXED_CONTENT);
34 } 34 }
35 35
36 void SSLPolicyBackend::HostRanContentWithCertErrors(const std::string& host,
37 int id) {
38 if (ssl_host_state_delegate_)
39 ssl_host_state_delegate_->HostRanInsecureContent(
40 host, id, SSLHostStateDelegate::CERT_ERRORS_CONTENT);
41 SSLManager::NotifySSLInternalStateChanged(controller_->GetBrowserContext());
42 }
43
44 bool SSLPolicyBackend::DidHostRunContentWithCertErrors(const std::string& host,
45 int pid) const {
46 if (!ssl_host_state_delegate_)
47 return false;
48
49 return ssl_host_state_delegate_->DidHostRunInsecureContent(
50 host, pid, SSLHostStateDelegate::CERT_ERRORS_CONTENT);
51 }
52
36 void SSLPolicyBackend::RevokeUserAllowExceptions(const std::string& host) { 53 void SSLPolicyBackend::RevokeUserAllowExceptions(const std::string& host) {
37 if (!ssl_host_state_delegate_) 54 if (!ssl_host_state_delegate_)
38 return; 55 return;
39 56
40 ssl_host_state_delegate_->RevokeUserAllowExceptions(host); 57 ssl_host_state_delegate_->RevokeUserAllowExceptions(host);
41 } 58 }
42 59
43 bool SSLPolicyBackend::HasAllowException(const std::string& host) { 60 bool SSLPolicyBackend::HasAllowException(const std::string& host) {
44 if (!ssl_host_state_delegate_) 61 if (!ssl_host_state_delegate_)
45 return false; 62 return false;
(...skipping 13 matching lines...) Expand all
59 const std::string& host, 76 const std::string& host,
60 net::CertStatus error, 77 net::CertStatus error,
61 bool* expired_previous_decision) { 78 bool* expired_previous_decision) {
62 return ssl_host_state_delegate_ ? 79 return ssl_host_state_delegate_ ?
63 ssl_host_state_delegate_->QueryPolicy( 80 ssl_host_state_delegate_->QueryPolicy(
64 host, cert, error, expired_previous_decision) : 81 host, cert, error, expired_previous_decision) :
65 SSLHostStateDelegate::DENIED; 82 SSLHostStateDelegate::DENIED;
66 } 83 }
67 84
68 } // namespace content 85 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698