Fix file access on Chrome for ChromeOS on Linux
so that we can open files in the user's Downloads
directory.

Shouldn't affect actual ChromeOS or other platforms.

BUG=chromium-os:29447
TEST=Ran on Linux, opened files from Downloads folder.


Review URL: http://codereview.chromium.org/10068021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135553 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 7e565e4..7a1bc7f 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -495,8 +495,8 @@
   return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
 }
 
-bool TestNetworkDelegate::CanGetCookies(const net::URLRequest* request,
-                                        const net::CookieList& cookie_list) {
+bool TestNetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
+                                          const net::CookieList& cookie_list) {
   bool allow = true;
   if (cookie_options_bit_mask_ & NO_GET_COOKIES)
     allow = false;
@@ -508,9 +508,9 @@
   return allow;
 }
 
-bool TestNetworkDelegate::CanSetCookie(const net::URLRequest* request,
-                                       const std::string& cookie_line,
-                                       net::CookieOptions* options) {
+bool TestNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
+                                         const std::string& cookie_line,
+                                         net::CookieOptions* options) {
   bool allow = true;
   if (cookie_options_bit_mask_ & NO_SET_COOKIE)
     allow = false;
@@ -527,6 +527,11 @@
   return allow;
 }
 
+bool TestNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
+                                          const FilePath& path) const {
+  return true;
+}
+
 // static
 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1");