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

Unified Diff: Source/core/fileapi/FileError.cpp

Issue 17761003: Remove FileException (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile warning Created 7 years, 6 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 | « Source/core/fileapi/FileError.h ('k') | Source/core/fileapi/FileException.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/FileError.cpp
diff --git a/Source/core/dom/NodeList.cpp b/Source/core/fileapi/FileError.cpp
similarity index 63%
copy from Source/core/dom/NodeList.cpp
copy to Source/core/fileapi/FileError.cpp
index fb06c70817bff7406297e671ca5dd5f5ff7f29e6..671b3090a8cc9ec198e7107f6b0a3136afb00eec 100644
--- a/Source/core/dom/NodeList.cpp
+++ b/Source/core/fileapi/FileError.cpp
@@ -29,29 +29,43 @@
*/
#include "config.h"
-#include "core/dom/NodeList.h"
-
-#include "core/dom/Node.h"
+#include "core/fileapi/FileError.h"
namespace WebCore {
-void NodeList::anonymousNamedGetter(const AtomicString& name, bool& returnValue0Enabled, RefPtr<Node>& returnValue0, bool& returnValue1Enabled, unsigned& returnValue1)
+ExceptionCode FileError::ErrorCodeToExceptionCode(ErrorCode code)
{
- // Length property cannot be overridden.
- DEFINE_STATIC_LOCAL(const AtomicString, length, ("length", AtomicString::ConstructFromLiteral));
- if (name == length) {
- returnValue1Enabled = true;
- returnValue1 = this->length();
- return;
+ switch (code) {
+ case OK:
+ return 0;
+ case NOT_FOUND_ERR:
+ return FSNotFoundError;
+ case SECURITY_ERR:
+ return FSSecurityError;
+ case ABORT_ERR:
+ return FSAbortError;
+ case NOT_READABLE_ERR:
+ return FSNotReadableError;
+ case ENCODING_ERR:
+ return FSEncodingError;
+ case NO_MODIFICATION_ALLOWED_ERR:
+ return FSNoModificationAllowedError;
+ case INVALID_STATE_ERR:
+ return FSInvalidStateError;
+ case SYNTAX_ERR:
+ return FSSyntaxError;
+ case INVALID_MODIFICATION_ERR:
+ return FSInvalidModificationError;
+ case QUOTA_EXCEEDED_ERR:
+ return FSQuotaExceededError;
+ case TYPE_MISMATCH_ERR:
+ return FSTypeMismatchError;
+ case PATH_EXISTS_ERR:
+ return FSPathExistsError;
+ default:
+ ASSERT_NOT_REACHED();
+ return 0;
}
-
- Node* result = namedItem(name);
- if (!result)
- return;
-
- returnValue0Enabled = true;
- returnValue0 = result;
}
-
} // namespace WebCore
« no previous file with comments | « Source/core/fileapi/FileError.h ('k') | Source/core/fileapi/FileException.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698