diff options
author | achuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 22:19:00 +0000 |
---|---|---|
committer | achuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 22:19:00 +0000 |
commit | abb26096d64316448c4203de724e02a3258a2dce (patch) | |
tree | e420ffe07316fe21161f0245dedfb42c5fd4afc7 /chrome/browser/browser_main.cc | |
parent | aab8b552b9901487f0288169f4b05d7cb2d14d11 (diff) | |
download | chromium_src-abb26096d64316448c4203de724e02a3258a2dce.zip chromium_src-abb26096d64316448c4203de724e02a3258a2dce.tar.gz chromium_src-abb26096d64316448c4203de724e02a3258a2dce.tar.bz2 |
Restrict file protocol on chromeos to certain whitelisted directories. Disable this for tests.
BUG=chromium-os:3412
TEST=Access file: directories on chromeos. browser, ui, interactive ui and unit tests should continue to pass.
Review URL: http://codereview.chromium.org/4160003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 90f7ce3..41c2322 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -97,6 +97,7 @@ #include "net/socket/tcp_client_socket.h" #include "net/spdy/spdy_session.h" #include "net/spdy/spdy_session_pool.h" +#include "net/url_request/url_request.h" #if defined(USE_LINUX_BREAKPAD) #include "base/linux_util.h" @@ -1215,6 +1216,11 @@ int BrowserMain(const MainFunctionParams& parameters) { // notification it needs to track the logged in user. g_browser_process->profile_manager()->GetDefaultProfile(); + // Allow access to file:// on ChromeOS for tests. + if (parsed_command_line.HasSwitch(switches::kAllowFileAccess)) { + URLRequest::AllowFileAccess(); + } + // There are two use cases for kLoginUser: // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" // 2) if passed alone, to signal that the indicated user has already |