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

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

Issue 2913733002: Add a browser test for access control for file: scheme (Closed)
Patch Set: just rebase 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
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698