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

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

Issue 2095006: Revert 47347 - (Original patch reviewed at http://codereview.chromium.org/206... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 7 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
« no previous file with comments | « chrome/browser/ssl/ssl_policy.cc ('k') | chrome/browser/ssl/ssl_policy_backend.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_POLICY_BACKEND_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_
6 #define CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_ 6 #define CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
24 // Ensure that the specified message is displayed to the user. This will 24 // Ensure that the specified message is displayed to the user. This will
25 // display an InfoBar at the top of the associated tab. 25 // display an InfoBar at the top of the associated tab.
26 void ShowMessage(const std::wstring& msg); 26 void ShowMessage(const std::wstring& msg);
27 27
28 // Same as ShowMessage but also contains a link that when clicked run the 28 // Same as ShowMessage but also contains a link that when clicked run the
29 // specified task. The SSL Manager becomes the owner of the task. 29 // specified task. The SSL Manager becomes the owner of the task.
30 void ShowMessageWithLink(const std::wstring& msg, 30 void ShowMessageWithLink(const std::wstring& msg,
31 const std::wstring& link_text, 31 const std::wstring& link_text,
32 Task* task); 32 Task* task);
33 33
34 // Records that a host has run insecure content. 34 // Records that a host is "broken," that is, the origin for that host has been
35 void HostRanInsecureContent(const std::string& host, int pid); 35 // contaminated with insecure content, either via HTTP or via HTTPS with a
36 // bad certificate.
37 void MarkHostAsBroken(const std::string& host, int pid);
36 38
37 // Returns whether the specified host ran insecure content. 39 // Returns whether the specified host was marked as broken.
38 bool DidHostRunInsecureContent(const std::string& host, int pid) const; 40 bool DidMarkHostAsBroken(const std::string& host, int pid) const;
39 41
40 // Records that |cert| is permitted to be used for |host| in the future. 42 // Records that |cert| is permitted to be used for |host| in the future.
41 void DenyCertForHost(net::X509Certificate* cert, const std::string& host); 43 void DenyCertForHost(net::X509Certificate* cert, const std::string& host);
42 44
43 // Records that |cert| is not permitted to be used for |host| in the future. 45 // Records that |cert| is not permitted to be used for |host| in the future.
44 void AllowCertForHost(net::X509Certificate* cert, const std::string& host); 46 void AllowCertForHost(net::X509Certificate* cert, const std::string& host);
45 47
46 // Queries whether |cert| is allowed or denied for |host|. 48 // Queries whether |cert| is allowed or denied for |host|.
47 net::X509Certificate::Policy::Judgment QueryPolicy( 49 net::X509Certificate::Policy::Judgment QueryPolicy(
48 net::X509Certificate* cert, const std::string& host); 50 net::X509Certificate* cert, const std::string& host);
(...skipping 22 matching lines...) Expand all
71 bool operator==(const std::wstring& other_message) const { 73 bool operator==(const std::wstring& other_message) const {
72 // We are uniquing SSLMessageInfo by their message only. 74 // We are uniquing SSLMessageInfo by their message only.
73 return message == other_message; 75 return message == other_message;
74 } 76 }
75 77
76 std::wstring message; 78 std::wstring message;
77 std::wstring link_text; 79 std::wstring link_text;
78 Task* action; 80 Task* action;
79 }; 81 };
80 82
83 // Dispatch NotificationType::SSL_INTERNAL_STATE_CHANGED notification.
84 void DispatchSSLInternalStateChanged();
85
81 // The NavigationController that owns this SSLManager. We are responsible 86 // The NavigationController that owns this SSLManager. We are responsible
82 // for the security UI of this tab. 87 // for the security UI of this tab.
83 NavigationController* controller_; 88 NavigationController* controller_;
84 89
85 // SSL state specific for each host. 90 // SSL state specific for each host.
86 SSLHostState* ssl_host_state_; 91 SSLHostState* ssl_host_state_;
87 92
88 // The list of messages that should be displayed (in info bars) when the page 93 // The list of messages that should be displayed (in info bars) when the page
89 // currently loading had loaded. 94 // currently loading had loaded.
90 std::vector<SSLMessageInfo> pending_messages_; 95 std::vector<SSLMessageInfo> pending_messages_;
91 96
92 DISALLOW_COPY_AND_ASSIGN(SSLPolicyBackend); 97 DISALLOW_COPY_AND_ASSIGN(SSLPolicyBackend);
93 }; 98 };
94 99
95 #endif // CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_ 100 #endif // CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_policy.cc ('k') | chrome/browser/ssl/ssl_policy_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698