diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 17:18:14 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 17:18:14 +0000 |
commit | 21da6eb1f8a9740de03cb1435bf935f5a3609a37 (patch) | |
tree | 47e6bdd8db72ee4b66f526bbe79cbca74ef85560 /net/url_request | |
parent | 0a173a23af355f6b4eceeb18f28b453063e4287c (diff) | |
download | chromium_src-21da6eb1f8a9740de03cb1435bf935f5a3609a37.zip chromium_src-21da6eb1f8a9740de03cb1435bf935f5a3609a37.tar.gz chromium_src-21da6eb1f8a9740de03cb1435bf935f5a3609a37.tar.bz2 |
* Add write and read/write support to FileStream (renamed from FileInputStream).
* Moved net/disk_cache/os_file to base/platform_file.
Review URL: http://codereview.chromium.org/8843
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_file_job.cc | 5 | ||||
-rw-r--r-- | net/url_request/url_request_file_job.h | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc index de3e6fa..608dc64 100644 --- a/net/url_request/url_request_file_job.cc +++ b/net/url_request/url_request_file_job.cc @@ -177,7 +177,10 @@ void URLRequestFileJob::DidResolve( if (!exists) { rv = net::ERR_FILE_NOT_FOUND; } else if (!is_directory_) { - rv = stream_.Open(file_path_, true); + int flags = base::PLATFORM_FILE_OPEN | + base::PLATFORM_FILE_READ | + base::PLATFORM_FILE_ASYNC; + rv = stream_.Open(file_path_, flags); } if (rv == net::OK) { diff --git a/net/url_request/url_request_file_job.h b/net/url_request/url_request_file_job.h index 92e326c..5d52850 100644 --- a/net/url_request/url_request_file_job.h +++ b/net/url_request/url_request_file_job.h @@ -7,7 +7,7 @@ #include "base/file_util.h" #include "net/base/completion_callback.h" -#include "net/base/file_input_stream.h" +#include "net/base/file_stream.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_job.h" @@ -34,7 +34,7 @@ class URLRequestFileJob : public URLRequestJob { void DidRead(int result); net::CompletionCallbackImpl<URLRequestFileJob> io_callback_; - net::FileInputStream stream_; + net::FileStream stream_; bool is_directory_; #if defined(OS_WIN) |