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

Unified Diff: chrome/browser/net/chrome_network_delegate.h

Issue 2913733002: Add a browser test for access control for file: scheme (Closed)
Patch Set: Rework the patch per feedback Created 3 years, 6 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: chrome/browser/net/chrome_network_delegate.h
diff --git a/chrome/browser/net/chrome_network_delegate.h b/chrome/browser/net/chrome_network_delegate.h
index 8937c09b504573546980dbd2ef6c2fb85c7e51f2..597c65cdc3a74757e41e65450bf50b06635220d8 100644
--- a/chrome/browser/net/chrome_network_delegate.h
+++ b/chrome/browser/net/chrome_network_delegate.h
@@ -134,6 +134,11 @@ class ChromeNetworkDelegate : public net::NetworkDelegateImpl {
static bool IsAccessAllowed(const base::FilePath& path,
const base::FilePath& profile_path);
+ // Enables access to all files for testing purposes. This function is used
+ // to bypass the access control for file: scheme. Calling this function
+ // with false brings back the original (production) behaviors.
+ static void EnableAccessToAllFilesForTesting(bool enabled);
+
private:
// NetworkDelegate implementation.
int OnBeforeURLRequest(net::URLRequest* request,

Powered by Google App Engine
This is Rietveld 408576698