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

Unified Diff: net/cert/mock_cert_verifier.h

Issue 2753123002: Add --ignore-certificate-errors-spki-list switch and UMA histogram. (Closed)
Patch Set: Move IgnoreErrorsCertVerifier to chrome/browser/ssl. Created 3 years, 8 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: net/cert/mock_cert_verifier.h
diff --git a/net/cert/mock_cert_verifier.h b/net/cert/mock_cert_verifier.h
index b5b35a1a0c4b394ceed7eee852ebd75c5b4a6383..d83645205db0ec5c9cc790dd45682ac4c329431f 100644
--- a/net/cert/mock_cert_verifier.h
+++ b/net/cert/mock_cert_verifier.h
@@ -39,6 +39,10 @@ class MockCertVerifier : public CertVerifier {
default_result_ = default_result;
}
+ // Controls invocation of the callback. If true, Verify() returns
+ // ERR_IO_PENDING and the callback is invoked with the actual result.
+ void set_async(bool async) { async_ = async; }
+
// Adds a rule that will cause any call to Verify() for |cert| to return rv,
// copying |verify_result| into the verified result.
// Note: Only the primary certificate of |cert| is checked. Any intermediate
@@ -59,6 +63,7 @@ class MockCertVerifier : public CertVerifier {
typedef std::list<Rule> RuleList;
int default_result_;
+ bool async_;
RuleList rules_;
};

Powered by Google App Engine
This is Rietveld 408576698