OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // A URLRequestMockHTTPJob class that inserts a time delay in processing. | 5 // A URLRequestMockHTTPJob class that inserts a time delay in processing. |
6 | 6 |
7 #ifndef CONTENT_TEST_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ | 7 #ifndef CONTENT_TEST_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ |
8 #define CONTENT_TEST_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ | 8 #define CONTENT_TEST_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ |
9 #pragma once | |
10 | 9 |
11 #include "base/timer.h" | 10 #include "base/timer.h" |
12 #include "content/test/net/url_request_mock_http_job.h" | 11 #include "content/test/net/url_request_mock_http_job.h" |
13 | 12 |
14 class URLRequestSlowHTTPJob : public URLRequestMockHTTPJob { | 13 class URLRequestSlowHTTPJob : public URLRequestMockHTTPJob { |
15 public: | 14 public: |
16 URLRequestSlowHTTPJob(net::URLRequest* request, const FilePath& file_path); | 15 URLRequestSlowHTTPJob(net::URLRequest* request, const FilePath& file_path); |
17 | 16 |
18 static const int kDelayMs; | 17 static const int kDelayMs; |
19 | 18 |
(...skipping 10 matching lines...) Expand all Loading... |
30 | 29 |
31 private: | 30 private: |
32 virtual ~URLRequestSlowHTTPJob(); | 31 virtual ~URLRequestSlowHTTPJob(); |
33 | 32 |
34 void RealStart(); | 33 void RealStart(); |
35 | 34 |
36 base::OneShotTimer<URLRequestSlowHTTPJob> delay_timer_; | 35 base::OneShotTimer<URLRequestSlowHTTPJob> delay_timer_; |
37 }; | 36 }; |
38 | 37 |
39 #endif // CONTENT_TEST_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ | 38 #endif // CONTENT_TEST_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ |
OLD | NEW |