| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 int64_t file_size; | 82 int64_t file_size; |
| 83 // Mime type associated with the file. | 83 // Mime type associated with the file. |
| 84 std::string mime_type; | 84 std::string mime_type; |
| 85 // Result returned from GetMimeTypeFromFile(), i.e. flag showing whether | 85 // Result returned from GetMimeTypeFromFile(), i.e. flag showing whether |
| 86 // obtaining of the mime type was successful. | 86 // obtaining of the mime type was successful. |
| 87 bool mime_type_result; | 87 bool mime_type_result; |
| 88 // Flag showing whether the file exists. | 88 // Flag showing whether the file exists. |
| 89 bool file_exists; | 89 bool file_exists; |
| 90 // Flag showing whether the file name actually refers to a directory. | 90 // Flag showing whether the file name actually refers to a directory. |
| 91 bool is_directory; | 91 bool is_directory; |
| 92 // Absolute path of the file (i.e. symbolic link is resolved). |
| 93 base::FilePath absolute_path; |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 // Fetches file info on a background thread. | 96 // Fetches file info on a background thread. |
| 95 static void FetchMetaInfo(const base::FilePath& file_path, | 97 static void FetchMetaInfo(const base::FilePath& file_path, |
| 96 FileMetaInfo* meta_info); | 98 FileMetaInfo* meta_info); |
| 97 | 99 |
| 98 // Callback after fetching file info on a background thread. | 100 // Callback after fetching file info on a background thread. |
| 99 void DidFetchMetaInfo(const FileMetaInfo* meta_info); | 101 void DidFetchMetaInfo(const FileMetaInfo* meta_info); |
| 100 | 102 |
| 101 // Callback after opening file on a background thread. | 103 // Callback after opening file on a background thread. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 119 Error range_parse_result_; | 121 Error range_parse_result_; |
| 120 | 122 |
| 121 base::WeakPtrFactory<URLRequestFileJob> weak_ptr_factory_; | 123 base::WeakPtrFactory<URLRequestFileJob> weak_ptr_factory_; |
| 122 | 124 |
| 123 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); | 125 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace net | 128 } // namespace net |
| 127 | 129 |
| 128 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 130 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| OLD | NEW |