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

Unified Diff: net/base/network_delegate_impl.h

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: disable checks in sub classes 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 side-by-side diff with in-line comments
Download patch
Index: net/base/network_delegate_impl.h
diff --git a/net/base/network_delegate_impl.h b/net/base/network_delegate_impl.h
index 8acdd72a027d2410be113dabc86caec3fe3e0750..fd6f764bf2665633232bbc50f4b18735d56c2a7d 100644
--- a/net/base/network_delegate_impl.h
+++ b/net/base/network_delegate_impl.h
@@ -182,10 +182,13 @@ class NET_EXPORT NetworkDelegateImpl : public NetworkDelegate {
CookieOptions* options) override;
// Called when a file access is attempted to allow the network delegate to
- // allow or block access to the given file path. Returns true if access is
- // allowed.
+ // allow or block access to the given file path, provided in the original
+ // and absolute forms (i.e. symbolic link is resolved). It's up to the sub
+ // class to decide which path to use for checking. Returns true if access
+ // is allowed.
mmenke 2017/04/18 17:24:45 same comment as in other file... Or better, just
satorux1 2017/04/21 08:05:37 Let me do it in a separate patch.
bool OnCanAccessFile(const URLRequest& request,
- const base::FilePath& path) const override;
+ const base::FilePath& original_path,
+ const base::FilePath& absolute_path) const override;
// Returns true if the given |url| has to be requested over connection that
// is not tracked by the server. Usually is false, unless user privacy

Powered by Google App Engine
This is Rietveld 408576698