summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkit_glue.cc
diff options
context:
space:
mode:
authorericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 01:24:36 +0000
committerericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 01:24:36 +0000
commitff7321db2060aa69b63b2090b0e5eb92d2df704e (patch)
treed0c7f2465677b4e1b7aedfa7e2c99ca916fd8b1b /webkit/glue/webkit_glue.cc
parentb331674628336f246aeaa85b50f1331d1fe6e9c0 (diff)
downloadchromium_src-ff7321db2060aa69b63b2090b0e5eb92d2df704e.zip
chromium_src-ff7321db2060aa69b63b2090b0e5eb92d2df704e.tar.gz
chromium_src-ff7321db2060aa69b63b2090b0e5eb92d2df704e.tar.bz2
Yet another try at submitting http://codereview.chromium.org/3397030/show.
This hopefully fixes the linux x64 failure, which appears to be a disagreement between int64 and long long. BUG=none TEST=none Review URL: http://codereview.chromium.org/3601001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.cc')
-rw-r--r--webkit/glue/webkit_glue.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index 33eff1a..661b87b 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -313,6 +313,26 @@ WebString FilePathToWebString(const FilePath& file_path) {
return FilePathStringToWebString(file_path.value());
}
+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_A_DIRECTORY:
+ return WebKit::WebFileErrorInvalidModification;
+ 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;
+ default:
+ return WebKit::WebFileErrorInvalidModification;
+ }
+}
+
namespace {
struct UserAgentState {