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

Side by Side Diff: content/browser/ssl/ssl_host_state.h

Issue 450833002: Add additional UMA stats for remembering certificate decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes from sky Created 6 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 | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ 5 #ifndef CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_
6 #define CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ 6 #define CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void RevokeAllowAndDenyPreferences(const std::string& host); 63 void RevokeAllowAndDenyPreferences(const std::string& host);
64 64
65 bool HasAllowedOrDeniedCert(const std::string& host); 65 bool HasAllowedOrDeniedCert(const std::string& host);
66 66
67 // Clear all allow/deny preferences. 67 // Clear all allow/deny preferences.
68 void Clear(); 68 void Clear();
69 69
70 // Queries whether |cert| is allowed or denied for |url| and |error|. 70 // Queries whether |cert| is allowed or denied for |url| and |error|.
71 net::CertPolicy::Judgment QueryPolicy(net::X509Certificate* cert, 71 net::CertPolicy::Judgment QueryPolicy(net::X509Certificate* cert,
72 const std::string& host, 72 const std::string& host,
73 net::CertStatus error); 73 net::CertStatus error,
74 bool* expired_previous_decision);
74 75
75 private: 76 private:
76 // A BrokenHostEntry is a pair of (host, process_id) that indicates the host 77 // A BrokenHostEntry is a pair of (host, process_id) that indicates the host
77 // contains insecure content in that renderer process. 78 // contains insecure content in that renderer process.
78 typedef std::pair<std::string, int> BrokenHostEntry; 79 typedef std::pair<std::string, int> BrokenHostEntry;
79 80
80 // Hosts which have been contaminated with insecure content in the 81 // Hosts which have been contaminated with insecure content in the
81 // specified process. Note that insecure content can travel between 82 // specified process. Note that insecure content can travel between
82 // same-origin frames in one processs but cannot jump between processes. 83 // same-origin frames in one processs but cannot jump between processes.
83 std::set<BrokenHostEntry> ran_insecure_content_hosts_; 84 std::set<BrokenHostEntry> ran_insecure_content_hosts_;
84 85
85 // The certificate decision store. It may be NULL, depending on the browsing 86 // The certificate decision store. It may be NULL, depending on the browsing
86 // context. This is owned by the browsing context. 87 // context. This is owned by the browsing context.
87 SSLHostStateDelegate* delegate_; 88 SSLHostStateDelegate* delegate_;
88 89
89 DISALLOW_COPY_AND_ASSIGN(SSLHostState); 90 DISALLOW_COPY_AND_ASSIGN(SSLHostState);
90 }; 91 };
91 92
92 } // namespace content 93 } // namespace content
93 94
94 #endif // CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ 95 #endif // CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698