Commit a7f5b321 authored by Chong Zhang's avatar Chong Zhang Committed by Commit Bot

Allow tests to access all files on Chrome OS

Chrome OS browser tests uses |ChromeNetworkDelegate::IsAccessAllowed|
but |g_access_to_all_files_enabled| was not hooked in.

This patch moved |g_access_to_all_files_enabled| to
|IsAccessAllowedInternal| to make sure it's always checked.

Bug: 884773
Change-Id: I5183f3250e13af151a987561bdf5f93a6f0200be
Reviewed-on: https://chromium-review.googlesource.com/1235122
Commit-Queue: Chong Zhang <chongz@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592617}
parent cabf4f1a
......@@ -78,6 +78,9 @@ bool g_access_to_all_files_enabled = false;
bool IsAccessAllowedInternal(const base::FilePath& path,
const base::FilePath& profile_path) {
if (g_access_to_all_files_enabled)
return true;
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
return true;
#else
......@@ -296,8 +299,6 @@ bool ChromeNetworkDelegate::OnCanAccessFile(
const net::URLRequest& request,
const base::FilePath& original_path,
const base::FilePath& absolute_path) const {
if (g_access_to_all_files_enabled)
return true;
return IsAccessAllowed(original_path, absolute_path, profile_path_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment