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

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

Issue 418133012: Add button to page info to revoke user certificate decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits from pkasting and rsesek 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_
6 #define CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_
7
8 #include <map>
9 #include <set>
10 #include <string>
11
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "base/supports_user_data.h"
15 #include "base/threading/non_thread_safe.h"
16 #include "content/common/content_export.h"
17 #include "content/public/browser/ssl_host_state.h"
18 #include "net/cert/cert_status_flags.h"
19 #include "net/cert/x509_certificate.h"
20
21 namespace content {
22 class BrowserContext;
23
24 class CONTENT_EXPORT SSLHostStateImpl : public SSLHostState {
25 public:
26 SSLHostStateImpl();
27 virtual ~SSLHostStateImpl();
28
29 virtual void HostRanInsecureContent(const std::string& host,
30 int pid) OVERRIDE;
31
32 virtual bool DidHostRunInsecureContent(const std::string& host,
33 int pid) const OVERRIDE;
34
35 virtual void DenyCertForHost(net::X509Certificate* cert,
36 const std::string& host,
37 net::CertStatus error) OVERRIDE;
38
39 virtual void AllowCertForHost(net::X509Certificate* cert,
40 const std::string& host,
41 net::CertStatus error) OVERRIDE;
42
43 virtual void Clear() OVERRIDE;
44
45 virtual void RevokeAllowAndDenyPreferences(const std::string& host) OVERRIDE;
46
47 virtual bool HasAllowedOrDeniedCert(const std::string& host) OVERRIDE;
48
49 virtual net::CertPolicy::Judgment QueryPolicy(net::X509Certificate* cert,
50 const std::string& host,
51 net::CertStatus error) OVERRIDE;
52
53 private:
54 // A BrokenHostEntry is a pair of (host, process_id) that indicates the host
55 // contains insecure content in that renderer process.
56 typedef std::pair<std::string, int> BrokenHostEntry;
57
58 // Hosts which have been contaminated with insecure content in the
59 // specified process. Note that insecure content can travel between
60 // same-origin frames in one processs but cannot jump between processes.
61 std::set<BrokenHostEntry> ran_insecure_content_hosts_;
62
63 // Certificate policies for each host.
64 std::map<std::string, net::CertPolicy> cert_policy_for_host_;
65 };
66
67 } // namespace content
68
69 #endif // CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698