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

Unified Diff: net/test/url_request/ssl_certificate_error_job.h

Issue 1239543003: [Cronet] Surface SSL cert error through CronetURLRequestAdapter::OnSSLCertificateError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add include Created 5 years, 5 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
« no previous file with comments | « net/net.gyp ('k') | net/test/url_request/ssl_certificate_error_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/url_request/ssl_certificate_error_job.h
diff --git a/net/test/url_request/ssl_certificate_error_job.h b/net/test/url_request/ssl_certificate_error_job.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3b372e8b004c9cf0e4b4054db3e1dd7b359c9ed
--- /dev/null
+++ b/net/test/url_request/ssl_certificate_error_job.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_TEST_URL_REQUEST_SSL_CERTIFICATE_ERROR_JOB_H_
+#define NET_TEST_URL_REQUEST_SSL_CERTIFICATE_ERROR_JOB_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "net/url_request/url_request_job.h"
+#include "url/gurl.h"
+
+namespace net {
+
+class NetworkDelegate;
+class URLRequest;
+
+// SSLCertificateErrorJob simulates a ERR_CERT_DATE_INVALID error.
+class SSLCertificateErrorJob : public URLRequestJob {
+ public:
+ SSLCertificateErrorJob(URLRequest* request,
+ NetworkDelegate* network_delegate);
+
+ // URLRequestJob implementation:
+ void Start() override;
+
+ // Adds the testing URLs to the URLRequestFilter.
+ static void AddUrlHandler();
+
+ static GURL GetMockUrl();
+
+ private:
+ ~SSLCertificateErrorJob() override;
+
+ void NotifyError();
+
+ base::WeakPtrFactory<SSLCertificateErrorJob> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(SSLCertificateErrorJob);
+};
+
+} // namespace net
+
+#endif // NET_TEST_URL_REQUEST_SSL_CERTIFICATE_ERROR_JOB_H_
« no previous file with comments | « net/net.gyp ('k') | net/test/url_request/ssl_certificate_error_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698