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

Side by Side Diff: content/test/mock_ssl_host_state_delegate.h

Issue 2292443003: Support host-based deletion for SSLHostStateDelegate (Closed)
Patch Set: Rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_
7 7
8 #include "content/public/browser/ssl_host_state_delegate.h" 8 #include "content/public/browser/ssl_host_state_delegate.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 class MockSSLHostStateDelegate : public SSLHostStateDelegate { 12 class MockSSLHostStateDelegate : public SSLHostStateDelegate {
13 public: 13 public:
14 MockSSLHostStateDelegate(); 14 MockSSLHostStateDelegate();
15 ~MockSSLHostStateDelegate() override; 15 ~MockSSLHostStateDelegate() override;
16 16
17 void AllowCert(const std::string& host, 17 void AllowCert(const std::string& host,
18 const net::X509Certificate& cert, 18 const net::X509Certificate& cert,
19 net::CertStatus error) override; 19 net::CertStatus error) override;
20 20
21 void Clear() override; 21 void Clear(
22 const base::Callback<bool(const std::string&)>& host_filter) override;
22 23
23 CertJudgment QueryPolicy(const std::string& host, 24 CertJudgment QueryPolicy(const std::string& host,
24 const net::X509Certificate& cert, 25 const net::X509Certificate& cert,
25 net::CertStatus error, 26 net::CertStatus error,
26 bool* expired_previous_decision) override; 27 bool* expired_previous_decision) override;
27 28
28 void HostRanInsecureContent(const std::string& host, 29 void HostRanInsecureContent(const std::string& host,
29 int child_id, 30 int child_id,
30 InsecureContentType content_type) override; 31 InsecureContentType content_type) override;
31 32
32 bool DidHostRunInsecureContent( 33 bool DidHostRunInsecureContent(
33 const std::string& host, 34 const std::string& host,
34 int child_id, 35 int child_id,
35 InsecureContentType content_type) const override; 36 InsecureContentType content_type) const override;
36 37
37 void RevokeUserAllowExceptions(const std::string& host) override; 38 void RevokeUserAllowExceptions(const std::string& host) override;
38 39
39 bool HasAllowException(const std::string& host) const override; 40 bool HasAllowException(const std::string& host) const override;
40 41
41 private: 42 private:
42 std::set<std::string> exceptions_; 43 std::set<std::string> exceptions_;
43 }; 44 };
44 45
45 } // namespace content 46 } // namespace content
46 47
47 #endif // CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ 48 #endif // CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/ssl_host_state_delegate.h ('k') | content/test/mock_ssl_host_state_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698