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

Side by Side Diff: ios/web/net/crw_cert_policy_cache.h

Issue 1357773002: WKWebView: Implemented recoverable SSL interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_coloring
Patch Set: Addressed unit tests review comments Created 5 years, 1 month 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
« no previous file with comments | « ios/web/net/cert_host_pair_unittest.cc ('k') | ios/web/net/crw_cert_policy_cache.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 #import <Foundation/Foundation.h>
6
7 #include "base/ios/block_types.h"
8 #include "base/memory/ref_counted.h"
9 #include "ios/web/public/cert_policy.h"
10 #include "net/cert/cert_status_flags.h"
11
12 namespace net {
13 class X509Certificate;
14 }
15
16 namespace web {
17 class CertificatePolicyCache;
18 }
19
20 // Adapter for web::CertificatePolicyCache, which is used to remember decisions
21 // about how to handle invalid certs that have been given a user exception.
22 // web::CertificatePolicyCache can be used only on IO thread while
23 // CRWCertPolicyCache is threadsafe and can be used on any thread.
24 @interface CRWCertPolicyCache : NSObject
25
26 // Unavailable, use |initWithCache:| instead.
27 - (instancetype)init NS_UNAVAILABLE;
28
29 // Initializes CRWCertPolicyCache.
30 - (instancetype)initWithCache:(scoped_refptr<web::CertificatePolicyCache>)cache
31 NS_DESIGNATED_INITIALIZER;
32
33 // Asynchronously queries whether |cert| with |status| is allowed or denied for
34 // |host|. |handler| can not be null and is always called on the main thread.
35 - (void)queryJudgementForCert:(scoped_refptr<net::X509Certificate>)cert
36 forHost:(NSString*)host
37 status:(net::CertStatus)certStatus
38 completionHandler:(void (^)(web::CertPolicy::Judgment))handler;
39
40 // Records that |cert| is permitted to be used for |host| in the future.
41 - (void)allowCert:(scoped_refptr<net::X509Certificate>)cert
42 forHost:(NSString*)host
43 status:(net::CertStatus)status;
44
45 @end
OLDNEW
« no previous file with comments | « ios/web/net/cert_host_pair_unittest.cc ('k') | ios/web/net/crw_cert_policy_cache.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698