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

Unified Diff: ios/web/net/cert_verifier_block_adapter.h

Issue 1230033005: WKWebView: Added cert verification API to web controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/net/cert_verifier_block_adapter.h
diff --git a/ios/web/net/cert_verifier_block_adapter.h b/ios/web/net/cert_verifier_block_adapter.h
index ee9829e68c4db76564129da3192602ef7b3d9b6c..ec91b0ac83e58a6a7b21c107aae0112bb95a4059 100644
--- a/ios/web/net/cert_verifier_block_adapter.h
+++ b/ios/web/net/cert_verifier_block_adapter.h
@@ -7,20 +7,20 @@
#include "base/memory/scoped_ptr.h"
#include "net/cert/cert_verifier.h"
+#include "net/cert/cert_verify_result.h"
#include "net/log/net_log.h"
namespace net {
-class CertVerifyResult;
class CRLSet;
class X509Certificate;
// Provides block-based interface for net::CertVerifier.
class CertVerifierBlockAdapter {
public:
- CertVerifierBlockAdapter();
// Constructs adapter with given |CertVerifier| which can not be null.
- CertVerifierBlockAdapter(scoped_ptr<CertVerifier> cert_verifier);
+ // CertVerifierBlockAdapter does NOT take ownership over |cert_verifier|.
+ CertVerifierBlockAdapter(CertVerifier* cert_verifier);
Ryan Sleevi 2015/08/06 03:07:08 BUG/STYLE: This should be explicit.
Eugene But (OOO till 7-30) 2015/08/07 02:27:20 Acknowledged. This constructor now accepts 2 argum
// When the verifier is destroyed, all certificate verification requests are
// canceled, and their completion handlers will not be called.
@@ -54,10 +54,9 @@ class CertVerifierBlockAdapter {
scoped_refptr<CRLSet> crl_set;
};
- // Type of verification completion block. On success CertVerifyResult is not
- // null and status is OK, otherwise CertVerifyResult is null and status is a
- // net error code.
- typedef void (^CompletionHandler)(scoped_ptr<CertVerifyResult>, int status);
+ // Type of verification completion block. On success status is OK, otherwise
+ // status is a net error code and CertVerifyResult is not a valid object.
+ typedef void (^CompletionHandler)(CertVerifyResult, int status);
Ryan Sleevi 2015/08/06 03:07:09 Do blocks not allow you to forward declare such st
Eugene But (OOO till 7-30) 2015/08/07 02:27:20 No you can't forward declare this block without in
// Verifies certificate with given |params|. |completion_handler| must not be
// null and call be called either syncronously (in the same runloop) or
@@ -65,8 +64,8 @@ class CertVerifierBlockAdapter {
void Verify(const Params& params, CompletionHandler completion_handler);
private:
- // Underlying CertVerifier.
- scoped_ptr<CertVerifier> cert_verifier_;
+ // Underlying weak CertVerifier.
Ryan Sleevi 2015/08/06 03:07:08 Weak has a particular meaning in Chromium (c.f. We
Eugene But (OOO till 7-30) 2015/08/07 02:27:20 Good catch. Changed to "unowned", because this is
+ CertVerifier* cert_verifier_;
// Net Log required by CertVerifier.
Ryan Sleevi 2015/08/06 03:07:09 This comment doesn't seem to help documentation mu
BoundNetLog net_log_;
};
« no previous file with comments | « no previous file | ios/web/net/cert_verifier_block_adapter.cc » ('j') | ios/web/net/cert_verifier_block_adapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698