Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: net/url_request/url_request_file_job.h

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: 2nd param Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_file_dir_job.cc ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/url_request/url_request_file_dir_job.cc ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698