OLD | NEW |
---|---|
(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 #ifndef COMPONENTS_CRONET_ANDROID_TEST_SSL_CERTIFICATE_ERROR_JOB_H_ | |
6 #define COMPONENTS_CRONET_ANDROID_TEST_SSL_CERTIFICATE_ERROR_JOB_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/weak_ptr.h" | |
10 #include "net/url_request/url_request_test_job.h" | |
11 #include "url/gurl.h" | |
12 | |
13 namespace cronet { | |
14 | |
15 // SSLCertificateErrorJob simulates a net::ERR_CERT_DATE_INVALID error. | |
16 class SSLCertificateErrorJob : public net::URLRequestTestJob { | |
mmenke
2015/07/17 19:29:59
Suggest putting this in net/test/url_request, to m
xunjieli
2015/07/17 20:15:21
Done. My initial concern was the use case of this
mmenke
2015/07/17 21:09:18
There are a bunch of browser tests that need to ge
xunjieli
2015/07/20 14:56:20
Acknowledged. I see! Makes sense. Good to know. Th
| |
17 public: | |
18 SSLCertificateErrorJob(net::URLRequest* request, | |
19 net::NetworkDelegate* network_delegate); | |
20 | |
21 // net::URLRequestTestJob implementation: | |
22 void Start() override; | |
23 | |
24 // Adds the testing URLs to the URLRequestFilter. | |
25 static void AddUrlHandler(); | |
26 | |
27 static GURL GetMockUrl(); | |
28 | |
29 protected: | |
30 ~SSLCertificateErrorJob() override; | |
mmenke
2015/07/17 19:29:59
Can make this private, since there are no subclass
xunjieli
2015/07/17 20:15:21
Done.
| |
31 | |
32 private: | |
33 void NotifyError(); | |
34 | |
35 base::WeakPtrFactory<SSLCertificateErrorJob> weak_factory_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(SSLCertificateErrorJob); | |
38 }; | |
39 | |
40 } // namespace cronet | |
41 | |
42 #endif // COMPONENTS_CRONET_ANDROID_TEST_SSL_CERTIFICATE_ERROR_JOB_H_ | |
OLD | NEW |