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

Unified Diff: webkit/blob/local_file_stream_reader.cc

Issue 10808043: Factor out common error-code conversion code for PlatformFileErrorToNetError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added NET_EXPORT symbol. Created 8 years, 5 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 | « webkit/blob/local_file_stream_reader.h ('k') | webkit/chromeos/fileapi/remote_file_stream_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/blob/local_file_stream_reader.cc
diff --git a/webkit/blob/local_file_stream_reader.cc b/webkit/blob/local_file_stream_reader.cc
index 10276d02556604a7287b71968e5dea3af48dd6e3..c7e96cdafbc16eff4980c725c512c6a74fc1a643 100644
--- a/webkit/blob/local_file_stream_reader.cc
+++ b/webkit/blob/local_file_stream_reader.cc
@@ -32,21 +32,6 @@ bool VerifySnapshotTime(const base::Time& expected_modification_time,
} // namespace
-// static
-int LocalFileStreamReader::PlatformFileErrorToNetError(
- base::PlatformFileError file_error) {
- switch (file_error) {
- case base::PLATFORM_FILE_OK:
- return net::OK;
- case base::PLATFORM_FILE_ERROR_NOT_FOUND:
- return net::ERR_FILE_NOT_FOUND;
- case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
- return net::ERR_ACCESS_DENIED;
- default:
- return net::ERR_FAILED;
- }
-}
-
LocalFileStreamReader::LocalFileStreamReader(
base::TaskRunner* task_runner,
const FilePath& file_path,
@@ -169,7 +154,7 @@ void LocalFileStreamReader::DidGetFileInfoForGetLength(
return;
}
if (error != base::PLATFORM_FILE_OK) {
- callback.Run(LocalFileStreamReader::PlatformFileErrorToNetError(error));
+ callback.Run(net::PlatformFileErrorToNetError(error));
return;
}
if (!VerifySnapshotTime(expected_modification_time_, file_info)) {
« no previous file with comments | « webkit/blob/local_file_stream_reader.h ('k') | webkit/chromeos/fileapi/remote_file_stream_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698