| 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 #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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/task.h" | 13 #include "base/task.h" |
| 14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/base/file_stream.h" | 15 #include "net/base/file_stream.h" |
| 16 #include "net/base/net_api.h" | 16 #include "net/base/net_export.h" |
| 17 #include "net/http/http_byte_range.h" | 17 #include "net/http/http_byte_range.h" |
| 18 #include "net/url_request/url_request.h" | 18 #include "net/url_request/url_request.h" |
| 19 #include "net/url_request/url_request_job.h" | 19 #include "net/url_request/url_request_job.h" |
| 20 | 20 |
| 21 namespace file_util { | 21 namespace file_util { |
| 22 struct FileInfo; | 22 struct FileInfo; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 | 26 |
| 27 // A request job that handles reading file URLs | 27 // A request job that handles reading file URLs |
| 28 class NET_API URLRequestFileJob : public URLRequestJob { | 28 class NET_EXPORT URLRequestFileJob : public URLRequestJob { |
| 29 public: | 29 public: |
| 30 URLRequestFileJob(URLRequest* request, const FilePath& file_path); | 30 URLRequestFileJob(URLRequest* request, const FilePath& file_path); |
| 31 | 31 |
| 32 static URLRequest::ProtocolFactory Factory; | 32 static URLRequest::ProtocolFactory Factory; |
| 33 | 33 |
| 34 #if defined(OS_CHROMEOS) | 34 #if defined(OS_CHROMEOS) |
| 35 static bool AccessDisabled(const FilePath& file_path); | 35 static bool AccessDisabled(const FilePath& file_path); |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 // URLRequestJob: | 38 // URLRequestJob: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 68 #endif | 68 #endif |
| 69 | 69 |
| 70 ScopedRunnableMethodFactory<URLRequestFileJob> method_factory_; | 70 ScopedRunnableMethodFactory<URLRequestFileJob> method_factory_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); | 72 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace net | 75 } // namespace net |
| 76 | 76 |
| 77 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 77 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| OLD | NEW |