OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef NET_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "net/base/net_export.h" | |
14 #include "net/url_request/url_request_job.h" | 13 #include "net/url_request/url_request_job.h" |
15 | 14 |
16 namespace net { | 15 namespace net { |
17 | 16 |
18 class URLRequest; | 17 class URLRequest; |
19 | 18 |
20 // Mock data job, which synchronously returns data repeated multiple times. If | 19 // Mock data job, which synchronously returns data repeated multiple times. If |
21 // |request_client_certificate| is true, then this job will request client | 20 // |request_client_certificate| is true, then this job will request client |
22 // certificate before proceeding. | 21 // certificate before proceeding. |
23 class URLRequestMockDataJob : public URLRequestJob { | 22 class URLRequestMockDataJob : public URLRequestJob { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 65 |
67 std::string data_; | 66 std::string data_; |
68 size_t data_offset_; | 67 size_t data_offset_; |
69 bool request_client_certificate_; | 68 bool request_client_certificate_; |
70 base::WeakPtrFactory<URLRequestMockDataJob> weak_factory_; | 69 base::WeakPtrFactory<URLRequestMockDataJob> weak_factory_; |
71 }; | 70 }; |
72 | 71 |
73 } // namespace net | 72 } // namespace net |
74 | 73 |
75 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ | 74 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ |
OLD | NEW |