| Index: chrome/browser/net/chrome_network_delegate.cc
|
| diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
|
| index caa09c08abbc36ee70f15424530950daf18ab8e9..11dd8dc97e23b3df20bbbdd5aac07e7282c0b984 100644
|
| --- a/chrome/browser/net/chrome_network_delegate.cc
|
| +++ b/chrome/browser/net/chrome_network_delegate.cc
|
| @@ -82,6 +82,8 @@ using content::ResourceRequestInfo;
|
|
|
| namespace {
|
|
|
| +bool g_access_to_all_files_enabled = false;
|
| +
|
| const char kDNTHeader[] = "DNT";
|
|
|
| // Gets called when the extensions finish work on the URL. If the extensions
|
| @@ -451,12 +453,8 @@ bool ChromeNetworkDelegate::OnCanAccessFile(
|
| const net::URLRequest& request,
|
| const base::FilePath& original_path,
|
| const base::FilePath& absolute_path) const {
|
| -#if defined(OS_CHROMEOS)
|
| - // browser_tests and interactive_ui_tests rely on the ability to open any
|
| - // files via file: scheme.
|
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType))
|
| + if (g_access_to_all_files_enabled)
|
| return true;
|
| -#endif
|
|
|
| #if defined(OS_ANDROID)
|
| // Android's whitelist relies on symbolic links (ex. /sdcard is whitelisted
|
| @@ -534,6 +532,11 @@ bool ChromeNetworkDelegate::IsAccessAllowed(
|
| #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
| }
|
|
|
| +// static
|
| +void ChromeNetworkDelegate::EnableAccessToAllFilesForTesting(bool enabled) {
|
| + g_access_to_all_files_enabled = enabled;
|
| +}
|
| +
|
| bool ChromeNetworkDelegate::OnCanEnablePrivacyMode(
|
| const GURL& url,
|
| const GURL& first_party_for_cookies) const {
|
|
|