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

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

Issue 42314: SSLPolicy fix: Step 9. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 CHROME_BROWSER_SSL_SSL_HOST_STATE_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_HOST_STATE_H_
6 #define CHROME_BROWSER_SSL_SSL_HOST_STATE_H_ 6 #define CHROME_BROWSER_SSL_SSL_HOST_STATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 23 matching lines...) Expand all
34 34
35 // Returns whether the specified host was marked as broken. 35 // Returns whether the specified host was marked as broken.
36 bool DidMarkHostAsBroken(const std::string& host); 36 bool DidMarkHostAsBroken(const std::string& host);
37 37
38 // Records that |cert| is permitted to be used for |host| in the future. 38 // Records that |cert| is permitted to be used for |host| in the future.
39 void DenyCertForHost(net::X509Certificate* cert, const std::string& host); 39 void DenyCertForHost(net::X509Certificate* cert, const std::string& host);
40 40
41 // Records that |cert| is not permitted to be used for |host| in the future. 41 // Records that |cert| is not permitted to be used for |host| in the future.
42 void AllowCertForHost(net::X509Certificate* cert, const std::string& host); 42 void AllowCertForHost(net::X509Certificate* cert, const std::string& host);
43 43
44 // Queries whether there is at least one certificate that has been manually
45 // allowed for this host.
46 bool DidAllowCertForHost(const std::string& host);
47
48 // Queries whether |cert| is allowed or denied for |host|. 44 // Queries whether |cert| is allowed or denied for |host|.
49 net::X509Certificate::Policy::Judgment QueryPolicy( 45 net::X509Certificate::Policy::Judgment QueryPolicy(
50 net::X509Certificate* cert, const std::string& host); 46 net::X509Certificate* cert, const std::string& host);
51 47
52 // Allows mixed content to be visible (non filtered). 48 // Allows mixed content to be visible (non filtered).
53 void AllowMixedContentForHost(const std::string& host); 49 void AllowMixedContentForHost(const std::string& host);
54 50
55 // Returns whether the specified host is allowed to show mixed content. 51 // Returns whether the specified host is allowed to show mixed content.
56 bool DidAllowMixedContentForHost(const std::string& host); 52 bool DidAllowMixedContentForHost(const std::string& host);
57 53
58 private: 54 private:
59 // Hosts which have been contaminated with unsafe content. 55 // Hosts which have been contaminated with unsafe content.
60 std::set<std::string> broken_hosts_; 56 std::set<std::string> broken_hosts_;
61 57
62 // Certificate policies for each host. 58 // Certificate policies for each host.
63 std::map<std::string, net::X509Certificate::Policy> cert_policy_for_host_; 59 std::map<std::string, net::X509Certificate::Policy> cert_policy_for_host_;
64 60
65 // Hosts for which we are allowed to show mixed content. 61 // Hosts for which we are allowed to show mixed content.
66 std::set<std::string> allow_mixed_content_for_host_; 62 std::set<std::string> allow_mixed_content_for_host_;
67 63
68 DISALLOW_COPY_AND_ASSIGN(SSLHostState); 64 DISALLOW_COPY_AND_ASSIGN(SSLHostState);
69 }; 65 };
70 66
71 #endif // CHROME_BROWSER_SSL_SSL_HOST_STATE_H_ 67 #endif // CHROME_BROWSER_SSL_SSL_HOST_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_request_details.h ('k') | chrome/browser/ssl/ssl_host_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698