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

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

Issue 2890123004: chromeos: Remove blanket file access logic from chromeos chrome on Linux (Closed)
Patch Set: add back kTestType Created 3 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84a4eb8a15a787786144526472125245c235c91f..6c04bc1c92e505d73d5e8ebf74f9c949dc2b45af 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -450,9 +450,9 @@ bool ChromeNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
bool ChromeNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
const base::FilePath& path) const {
#if defined(OS_CHROMEOS)
- // If we're running Chrome for ChromeOS on Linux, we want to allow file
- // access. This is checked here to make IsAccessAllowed() unit-testable.
- if (!base::SysInfo::IsRunningOnChromeOS())
+ // browser_tests and interactive_ui_tests rely on the ability to open any
+ // files via file: scheme.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType))
return true;
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698