| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_FILE_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/file_util.h" | |
| 12 #include "net/base/completion_callback.h" | 11 #include "net/base/completion_callback.h" |
| 13 #include "net/base/file_stream.h" | 12 #include "net/base/file_stream.h" |
| 14 #include "net/http/http_byte_range.h" | 13 #include "net/http/http_byte_range.h" |
| 15 #include "net/url_request/url_request.h" | 14 #include "net/url_request/url_request.h" |
| 16 #include "net/url_request/url_request_job.h" | 15 #include "net/url_request/url_request_job.h" |
| 17 | 16 |
| 17 namespace file_util { |
| 18 struct FileInfo; |
| 19 } |
| 20 |
| 18 // A request job that handles reading file URLs | 21 // A request job that handles reading file URLs |
| 19 class URLRequestFileJob : public URLRequestJob { | 22 class URLRequestFileJob : public URLRequestJob { |
| 20 public: | 23 public: |
| 21 URLRequestFileJob(URLRequest* request, const FilePath& file_path); | 24 URLRequestFileJob(URLRequest* request, const FilePath& file_path); |
| 22 virtual ~URLRequestFileJob(); | 25 virtual ~URLRequestFileJob(); |
| 23 | 26 |
| 24 virtual void Start(); | 27 virtual void Start(); |
| 25 virtual void Kill(); | 28 virtual void Kill(); |
| 26 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); | 29 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); |
| 27 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); | 30 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 51 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
| 52 class AsyncResolver; | 55 class AsyncResolver; |
| 53 friend class AsyncResolver; | 56 friend class AsyncResolver; |
| 54 scoped_refptr<AsyncResolver> async_resolver_; | 57 scoped_refptr<AsyncResolver> async_resolver_; |
| 55 #endif | 58 #endif |
| 56 | 59 |
| 57 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); | 60 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 63 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| OLD | NEW |