OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 NET_TEST_URL_REQUEST_URL_REQUEST_HANGING_CONNECT_JOB_H_ |
| 6 #define NET_TEST_URL_REQUEST_URL_REQUEST_HANGING_CONNECT_JOB_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "net/url_request/url_request_job.h" |
| 10 #include "url/gurl.h" |
| 11 |
| 12 namespace net { |
| 13 |
| 14 class URLRequest; |
| 15 |
| 16 // URLRequestJob that simulates a hanging connect by not starting the job. |
| 17 class URLRequestHangingConnectJob : public URLRequestJob { |
| 18 public: |
| 19 URLRequestHangingConnectJob(URLRequest* request, |
| 20 NetworkDelegate* network_delegate); |
| 21 |
| 22 // URLRequestJob implementation: |
| 23 void Start() override; |
| 24 |
| 25 // Adds the testing URLs to the URLRequestFilter. |
| 26 static void AddUrlHandler(); |
| 27 |
| 28 static GURL GetMockHttpUrl(); |
| 29 static GURL GetMockHttpsUrl(); |
| 30 |
| 31 protected: |
| 32 ~URLRequestHangingConnectJob() override; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(URLRequestHangingConnectJob); |
| 35 }; |
| 36 |
| 37 } // namespace net |
| 38 |
| 39 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_HANGING_CONNECT_JOB_H_ |
OLD | NEW |