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

Unified Diff: webkit/fileapi/file_system_util.cc

Issue 10447055: Move fileapi into its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 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 | « webkit/fileapi/file_system_util.h ('k') | webkit/fileapi/file_util_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_util.cc
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
index 0bfbb5e5b692491e50b0e2c70f8d491688e371ce..985c021ac4beb2646c22be9e54979f015474e388 100644
--- a/webkit/fileapi/file_system_util.cc
+++ b/webkit/fileapi/file_system_util.cc
@@ -249,4 +249,31 @@ FilePath StringToFilePath(const std::string& file_path_string) {
#endif
}
+WebKit::WebFileError PlatformFileErrorToWebFileError(
+ base::PlatformFileError error_code) {
+ switch (error_code) {
+ case base::PLATFORM_FILE_ERROR_NOT_FOUND:
+ return WebKit::WebFileErrorNotFound;
+ case base::PLATFORM_FILE_ERROR_INVALID_OPERATION:
+ case base::PLATFORM_FILE_ERROR_EXISTS:
+ case base::PLATFORM_FILE_ERROR_NOT_EMPTY:
+ return WebKit::WebFileErrorInvalidModification;
+ case base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY:
+ case base::PLATFORM_FILE_ERROR_NOT_A_FILE:
+ return WebKit::WebFileErrorTypeMismatch;
+ case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
+ return WebKit::WebFileErrorNoModificationAllowed;
+ case base::PLATFORM_FILE_ERROR_FAILED:
+ return WebKit::WebFileErrorInvalidState;
+ case base::PLATFORM_FILE_ERROR_ABORT:
+ return WebKit::WebFileErrorAbort;
+ case base::PLATFORM_FILE_ERROR_SECURITY:
+ return WebKit::WebFileErrorSecurity;
+ case base::PLATFORM_FILE_ERROR_NO_SPACE:
+ return WebKit::WebFileErrorQuotaExceeded;
+ default:
+ return WebKit::WebFileErrorInvalidModification;
+ }
+}
+
} // namespace fileapi
« no previous file with comments | « webkit/fileapi/file_system_util.h ('k') | webkit/fileapi/file_util_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698