Chromium Code Reviews| Index: content/public/browser/ssl_host_state_delegate.h |
| diff --git a/content/public/browser/ssl_host_state_delegate.h b/content/public/browser/ssl_host_state_delegate.h |
| index 859a4e78be5fce2548dc41fa09af757927fbc55d..c4da411ec22c7e722421d02ff3d2fb44137d54c2 100644 |
| --- a/content/public/browser/ssl_host_state_delegate.h |
| +++ b/content/public/browser/ssl_host_state_delegate.h |
| @@ -7,15 +7,25 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/threading/non_thread_safe.h" |
| #include "content/common/content_export.h" |
| #include "net/cert/x509_certificate.h" |
| namespace content { |
| +// The SSLHostStateDelegate encapulates the host-specific state for SSL errors. |
| +// For example, SSLHostStateDelegate remembers whether the user has whitelisted |
| +// a particular broken cert for use with particular host. We separate this |
| +// state from the SSLManager because this state is shared across many navigation |
| +// controllers. |
| +// |
| // SSLHostStateDelegate may be implemented by the embedder to provide a storage |
| -// strategy for certificate decisions. |
| -class SSLHostStateDelegate { |
| +// strategy for certificate decisions or it may be left unimplemented to use a |
| +// default strategy of not remembering decisions at all. |
| +class SSLHostStateDelegate : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
|
jam
2014/08/06 21:27:26
remove the NonThreadSafe part, we don't put that o
jww
2014/08/08 16:48:50
Done.
|
| public: |
| + SSLHostStateDelegate() {} |
|
jam
2014/08/06 21:27:26
nit: not needed
jww
2014/08/08 16:48:50
Done.
|
| + |
| // Records that |cert| is not permitted to be used for |host| in the future, |
| // for a specified |error| type. |
| virtual void DenyCert(const std::string& host, |
| @@ -43,8 +53,18 @@ class SSLHostStateDelegate { |
| // false. |
| virtual bool HasAllowedOrDeniedCert(const std::string& host) = 0; |
| + // Records that a host has run insecure content. |
| + virtual void HostRanInsecureContent(const std::string& host, int pid) = 0; |
| + |
| + // Returns whether the specified host ran insecure content. |
| + virtual bool DidHostRunInsecureContent(const std::string& host, |
| + int pid) const = 0; |
| + |
| protected: |
| virtual ~SSLHostStateDelegate() {} |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(SSLHostStateDelegate); |
|
jam
2014/08/06 21:27:26
nit:not needed on an abstract interface..
jww
2014/08/08 16:48:50
Done.
|
| }; |
| } // namespace content |