OLD | NEW |
---|---|
(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_PUBLIC_BROWSER_SSL_SSL_HOST_STATE_H_ | |
6 #define CONTENT_PUBLIC_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 "net/cert/cert_status_flags.h" | |
18 #include "net/cert/x509_certificate.h" | |
19 | |
20 namespace content { | |
21 class BrowserContext; | |
22 class SSLHostStateDelegate; | |
23 | |
24 // SSLHostState | |
25 // | |
26 // The SSLHostState encapulates the host-specific state for SSL errors. For | |
27 // example, SSLHostState remembers whether the user has whitelisted a | |
28 // particular broken cert for use with particular host. We separate this state | |
29 // from the SSLManager because this state is shared across many navigation | |
30 // controllers. | |
31 class CONTENT_EXPORT SSLHostState | |
32 : NON_EXPORTED_BASE(public base::NonThreadSafe) { | |
jam
2014/08/06 21:27:26
nit: get rid of the NonThreadSafe, if you really w
jww
2014/08/11 19:21:28
Removed ssl_host_state.{h,cc} completely, as per o
| |
33 public: | |
34 SSLHostState(BrowserContext*); | |
35 virtual ~SSLHostState() {} | |
36 | |
37 // Revoke all allow/deny preferences for a given host. The | |
38 // RevokeAllowAndDenyPreferencesHard version may close idle connections in the | |
39 // process. This version should be used *only* for rare events, such as a user | |
40 // controlled button, as it may be very disruptive to the networking stack. | |
41 virtual void RevokeAllowAndDenyPreferences(const std::string& host); | |
42 virtual void RevokeAllowAndDenyPreferencesHard(const std::string& host); | |
43 | |
44 virtual bool HasAllowedOrDeniedCert(const std::string& host); | |
jam
2014/08/06 21:27:26
nit: document
jww
2014/08/11 19:21:28
Removed ssl_host_state.{h,cc} completely, as per o
| |
45 | |
46 void set_delegate(SSLHostStateDelegate* delegate) { delegate_ = delegate; } | |
jam
2014/08/06 21:27:26
this would be a pure method called SetDelegate
jww
2014/08/11 19:21:28
Removed ssl_host_state.{h,cc} completely, as per o
| |
47 | |
48 protected: | |
49 // BrowserContext that the state was created on. | |
50 BrowserContext* browser_context_; | |
51 | |
52 // The certificate decision store. It may be NULL, depending on the browsing | |
53 // context. This is owned by the browsing context. | |
54 SSLHostStateDelegate* delegate_; | |
jam
2014/08/06 21:27:26
nit: see http://www.chromium.org/developers/conten
jww
2014/08/11 19:21:28
Removed ssl_host_state.{h,cc} completely, as per o
| |
55 }; | |
56 | |
57 } // namespace content | |
58 | |
59 #endif // CONTENT_PUBLIC_BROWSER_SSL_SSL_HOST_STATE_H_ | |
OLD | NEW |