| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This class simulates a slow download. Requests to |kUnknownSizeUrl| and | 4 // This class simulates a slow download. Requests to |kUnknownSizeUrl| and |
| 5 // |kKnownSizeUrl| start downloads that pause after the first N bytes, to be | 5 // |kKnownSizeUrl| start downloads that pause after the first N bytes, to be |
| 6 // completed by sending a request to |kFinishDownloadUrl|. | 6 // completed by sending a request to |kFinishDownloadUrl|. |
| 7 | 7 |
| 8 #ifndef NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_ | 8 #ifndef NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_ |
| 9 #define NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_ | 9 #define NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_ |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 int bytes_already_sent_; | 91 int bytes_already_sent_; |
| 92 bool should_error_download_; | 92 bool should_error_download_; |
| 93 bool should_finish_download_; | 93 bool should_finish_download_; |
| 94 scoped_refptr<IOBuffer> buffer_; | 94 scoped_refptr<IOBuffer> buffer_; |
| 95 int buffer_size_; | 95 int buffer_size_; |
| 96 | 96 |
| 97 base::WeakPtrFactory<URLRequestSlowDownloadJob> weak_factory_; | 97 base::WeakPtrFactory<URLRequestSlowDownloadJob> weak_factory_; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace content | 100 } // namespace net |
| 101 | 101 |
| 102 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_ | 102 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_ |
| OLD | NEW |