| 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 | 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // A request job that handles reading file URLs | 24 // A request job that handles reading file URLs |
| 25 class NET_EXPORT URLRequestFileJob : public URLRequestJob { | 25 class NET_EXPORT URLRequestFileJob : public URLRequestJob { |
| 26 public: | 26 public: |
| 27 URLRequestFileJob(URLRequest* request, | 27 URLRequestFileJob(URLRequest* request, |
| 28 NetworkDelegate* network_delegate, | 28 NetworkDelegate* network_delegate, |
| 29 const FilePath& file_path); | 29 const FilePath& file_path); |
| 30 | 30 |
| 31 static URLRequest::ProtocolFactory Factory; | 31 static URLRequest::ProtocolFactory Factory; |
| 32 | 32 |
| 33 #if defined(OS_CHROMEOS) | |
| 34 static bool AccessDisabled(const FilePath& file_path); | |
| 35 #endif | |
| 36 | |
| 37 // URLRequestJob: | 33 // URLRequestJob: |
| 38 virtual void Start() OVERRIDE; | 34 virtual void Start() OVERRIDE; |
| 39 virtual void Kill() OVERRIDE; | 35 virtual void Kill() OVERRIDE; |
| 40 virtual bool ReadRawData(IOBuffer* buf, | 36 virtual bool ReadRawData(IOBuffer* buf, |
| 41 int buf_size, | 37 int buf_size, |
| 42 int* bytes_read) OVERRIDE; | 38 int* bytes_read) OVERRIDE; |
| 43 virtual bool IsRedirectResponse(GURL* location, | 39 virtual bool IsRedirectResponse(GURL* location, |
| 44 int* http_status_code) OVERRIDE; | 40 int* http_status_code) OVERRIDE; |
| 45 virtual Filter* SetupFilter() const OVERRIDE; | 41 virtual Filter* SetupFilter() const OVERRIDE; |
| 46 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 42 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 71 class AsyncResolver; | 67 class AsyncResolver; |
| 72 friend class AsyncResolver; | 68 friend class AsyncResolver; |
| 73 scoped_refptr<AsyncResolver> async_resolver_; | 69 scoped_refptr<AsyncResolver> async_resolver_; |
| 74 | 70 |
| 75 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); | 71 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); |
| 76 }; | 72 }; |
| 77 | 73 |
| 78 } // namespace net | 74 } // namespace net |
| 79 | 75 |
| 80 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 76 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| OLD | NEW |