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

Unified Diff: net/url_request/url_request_file_job.h

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: remove dcheck Created 3 years, 7 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_job.h
diff --git a/net/url_request/url_request_file_job.h b/net/url_request/url_request_file_job.h
index ec907679481827eca9a5c04fbdb451ebc43b9848..64638aca47c97a20f7d7552a74fd081e1dd4d2f8 100644
--- a/net/url_request/url_request_file_job.h
+++ b/net/url_request/url_request_file_job.h
@@ -72,6 +72,11 @@ class NET_EXPORT URLRequestFileJob : public URLRequestJob {
base::FilePath file_path_;
private:
+ // This class checks if a path is accessible via file: scheme, with
+ // NetworkDelegate. Subclasses can disable the check if needed.
+ virtual bool CanAccessFile(const base::FilePath& original_path,
+ const base::FilePath& absolute_path);
+
// Meta information about the file. It's used as a member in the
// URLRequestFileJob and also passed between threads because disk access is
// necessary to obtain it.
@@ -89,6 +94,8 @@ class NET_EXPORT URLRequestFileJob : public URLRequestJob {
bool file_exists;
// Flag showing whether the file name actually refers to a directory.
bool is_directory;
+ // Absolute path of the file (i.e. symbolic link is resolved).
+ base::FilePath absolute_path;
};
// Fetches file info on a background thread.
« 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