[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kinuko at chromium.org kinuko at chromium.org
Wed Dec 22 14:16:38 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5f6f77c3547c41a9be66d060a157e6900448b3cf
Author: kinuko at chromium.org <kinuko at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 6 05:52:05 2010 +0000

    2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by David Levin.
    
            Add idl and mock classes for FileSystemSync for FileSystem API
            https://bugs.webkit.org/show_bug.cgi?id=46405
    
            Added bunch of *Sync classes, plus refactored some classes:
            Added DOMFileSystemBase as a common base class for DOMFileSystem and
            DOMFileSystemSync.
            Added EntryBase as a common base class for Entry and EntrySync.
            Added DirectoryReaderBase as a common base class for DirectoryReader and
            DirectoryReaderSync.
    
            Test: fast/filesystem/workers/
    
            * CMakeLists.txt: Added new files.
            * DerivedSources.cpp: Added new files.
            * DerivedSources.make: Added new files.
            * GNUmakefile.am: Added new files.
            * WebCore.gypi: Added new files.
            * WebCore.pri: Added new files.
            * WebCore.pro: Added new files.
            * WebCore.vcproj/WebCore.vcproj: Added new files. Also removed the duplicated fileapi\FileEntry.cpp entry.
            * WebCore.xcodeproj/project.pbxproj: Added new files.
            * bindings/js/JSDirectoryEntrySyncCustom.cpp: Added.
            * bindings/js/JSEntrySyncCustom.cpp: Added.
            * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: Added.
            * bindings/v8/custom/V8EntrySyncCustom.cpp: Added.
            * fileapi/DOMFileSystemBase.cpp: Added.
            * fileapi/DOMFileSystemBase.h: Added.
            * fileapi/DOMFileSystemSync.cpp: Added.
            * fileapi/DOMFileSystemSync.h: Added.
            * fileapi/DOMFileSystemSync.idl: Added.
            * fileapi/DirectoryEntrySync.cpp: Added.
            * fileapi/DirectoryEntrySync.h: Added.
            * fileapi/DirectoryEntrySync.idl: Added.
            * fileapi/DirectoryReaderBase.h: Added.
            * fileapi/DirectoryReaderSync.cpp: Added.
            * fileapi/DirectoryReaderSync.h: Added.
            * fileapi/DirectoryReaderSync.idl: Added.
            * fileapi/EntryArraySync.cpp: Added.
            * fileapi/EntryArraySync.h: Added.
            * fileapi/EntryArraySync.idl: Added.
            * fileapi/EntryBase.h: Added.
            * fileapi/EntrySync.cpp: Added.
            * fileapi/EntrySync.h: Added.
            * fileapi/EntrySync.idl: Added.
            * fileapi/FileEntrySync.cpp: Added.
            * fileapi/FileEntrySync.h: Added.
            * fileapi/FileEntrySync.idl: Added.
    2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by David Levin.
    
            Add idl and mock classes for FileSystemSync for FileSystem API
            https://bugs.webkit.org/show_bug.cgi?id=46405
    
            Add small subset of tests for workers (and non-workers) that can be
            tested with the current minimal implementation.
    
            An entry method (requestFileSystemSync) is not yet exposed to the
            WorkerContext in this patch, so workers/simple-*-sync-expected.txt
            have reference errors for now.
    
            * fast/filesystem/resources/fs-worker-common.js: Added.
            * fast/filesystem/resources/fs-worker-test-post.js: Added.
            * fast/filesystem/resources/fs-worker-test-pre.js: Added.
            * fast/filesystem/resources/simple-persistent-sync.js: Added.
            * fast/filesystem/resources/simple-persistent.js: Added.
            * fast/filesystem/resources/simple-temporary-sync.js: Added.
            * fast/filesystem/resources/simple-temporary.js: Added.
            * fast/filesystem/simple-persistent-expected.txt: Added.
            * fast/filesystem/simple-persistent.html: Added.
            * fast/filesystem/simple-temporary-expected.txt: Added.
            * fast/filesystem/simple-temporary.html: Added.
            * fast/filesystem/workers/simple-persistent-expected.txt: Added.
            * fast/filesystem/workers/simple-persistent-sync-expected.txt: Added.
            * fast/filesystem/workers/simple-persistent-sync.html: Added.
            * fast/filesystem/workers/simple-persistent-sync.txt: Added.
            * fast/filesystem/workers/simple-persistent.html: Added.
            * fast/filesystem/workers/simple-temporary-expected.txt: Added.
            * fast/filesystem/workers/simple-temporary-sync-expected.txt: Added.
            * fast/filesystem/workers/simple-temporary-sync.html: Added.
            * fast/filesystem/workers/simple-temporary.html: Added.
            * fast/js/resources/fs-test-post.js: Added.
            * platform/chromium/test_expectations.txt: Added fast/filesystem/workers
            not to run them in regular test runs.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69178 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 33ac24d..78d5af0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,41 @@
+2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by David Levin.
+
+        Add idl and mock classes for FileSystemSync for FileSystem API
+        https://bugs.webkit.org/show_bug.cgi?id=46405
+
+        Add small subset of tests for workers (and non-workers) that can be
+        tested with the current minimal implementation.
+
+        An entry method (requestFileSystemSync) is not yet exposed to the
+        WorkerContext in this patch, so workers/simple-*-sync-expected.txt
+        have reference errors for now.
+
+        * fast/filesystem/resources/fs-worker-common.js: Added.
+        * fast/filesystem/resources/fs-worker-test-post.js: Added.
+        * fast/filesystem/resources/fs-worker-test-pre.js: Added.
+        * fast/filesystem/resources/simple-persistent-sync.js: Added.
+        * fast/filesystem/resources/simple-persistent.js: Added.
+        * fast/filesystem/resources/simple-temporary-sync.js: Added.
+        * fast/filesystem/resources/simple-temporary.js: Added.
+        * fast/filesystem/simple-persistent-expected.txt: Added.
+        * fast/filesystem/simple-persistent.html: Added.
+        * fast/filesystem/simple-temporary-expected.txt: Added.
+        * fast/filesystem/simple-temporary.html: Added.
+        * fast/filesystem/workers/simple-persistent-expected.txt: Added.
+        * fast/filesystem/workers/simple-persistent-sync-expected.txt: Added.
+        * fast/filesystem/workers/simple-persistent-sync.html: Added.
+        * fast/filesystem/workers/simple-persistent-sync.txt: Added.
+        * fast/filesystem/workers/simple-persistent.html: Added.
+        * fast/filesystem/workers/simple-temporary-expected.txt: Added.
+        * fast/filesystem/workers/simple-temporary-sync-expected.txt: Added.
+        * fast/filesystem/workers/simple-temporary-sync.html: Added.
+        * fast/filesystem/workers/simple-temporary.html: Added.
+        * fast/js/resources/fs-test-post.js: Added.
+        * platform/chromium/test_expectations.txt: Added fast/filesystem/workers
+        not to run them in regular test runs.
+
 2010-10-05  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/fast/filesystem/flags-passing-expected.txt b/LayoutTests/fast/filesystem/flags-passing-expected.txt
index 575a7f6..a0e56a6 100644
--- a/LayoutTests/fast/filesystem/flags-passing-expected.txt
+++ b/LayoutTests/fast/filesystem/flags-passing-expected.txt
@@ -8,6 +8,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 * Passing a Flags object (with exclusive=true).
 * Passing JSON Flags object.
 * Passing JSON Flags object (with exclusive=true).
+* Passing null as a Flags parameter.
 Finished running tests.
 PASS expectedCallbacksCount is 3
 PASS unexpectedCallbacksCount is 0
diff --git a/LayoutTests/fast/filesystem/resources/fs-worker-common.js b/LayoutTests/fast/filesystem/resources/fs-worker-common.js
new file mode 100644
index 0000000..a2ba1f1
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/fs-worker-common.js
@@ -0,0 +1,37 @@
+function debug(message)
+{
+    postMessage(message);
+}
+
+function finishJSTest()
+{
+    postMessage("DONE");
+}
+
+function description(message)
+{
+    postMessage('Description: ' + message);
+}
+
+function shouldBe(_a, _b)
+{
+  if (typeof _a != "string" || typeof _b != "string")
+    debug("WARN: shouldBe() expects string arguments");
+  var _av = eval(_a);
+  var _bv = eval(_b);
+  if (_av === _bv)
+    debug("PASS: " + _a + " is " + _b);
+  else
+    debug("FAIL: " + _a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
+}
+
+function shouldBeTrue(_a) { shouldBe(_a, "true"); }
+
+if (this.importScripts && !this.requestFileSystem) {
+    debug('This test requires FileSystem API.');
+    finishJSTest();
+}
+
+onmessage = function(event) {
+    importScripts(event.data);
+}
diff --git a/LayoutTests/fast/filesystem/resources/fs-worker-test-post.js b/LayoutTests/fast/filesystem/resources/fs-worker-test-post.js
new file mode 100644
index 0000000..234b025
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/fs-worker-test-post.js
@@ -0,0 +1,8 @@
+wasPostTestScriptParsed = true;
+
+if (window.layoutTestController) {
+    layoutTestController.waitUntilDone();
+    window.jsTestIsAsync = true;
+}
+if (window.wasFinishJSTestCalled)
+    finishJSTest();
diff --git a/LayoutTests/fast/filesystem/resources/fs-worker-test-pre.js b/LayoutTests/fast/filesystem/resources/fs-worker-test-pre.js
new file mode 100644
index 0000000..84e0fad
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/fs-worker-test-pre.js
@@ -0,0 +1,37 @@
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+function debug(message)
+{
+    document.getElementById("console").innerHTML += message + "<br/>";
+}
+
+function startWorker(testScriptURL)
+{
+    debug('Starting worker: ' + testScriptURL);
+    var worker = new Worker('../resources/fs-worker-common.js');
+    worker.postMessage(testScriptURL);
+    worker.onmessage = function(event)
+    {
+        debug(event.data);
+        if (event.data == "DONE")
+            finishJSTest();
+    };
+
+    worker.onerror = function(event)
+    {
+        alert(event);
+        debug('Got error from worker: ' + event.message);
+        finishJSTest();
+    }
+}
+
+function finishJSTest()
+{
+    wasFinishJSTestCalled = true;
+    if (!window.wasPostTestScriptParsed)
+        return;
+    debug('<br /><span class="pass">TEST COMPLETE</span>');
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
diff --git a/LayoutTests/fast/filesystem/resources/simple-persistent-sync.js b/LayoutTests/fast/filesystem/resources/simple-persistent-sync.js
new file mode 100644
index 0000000..35b0090
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/simple-persistent-sync.js
@@ -0,0 +1,9 @@
+description("requestFileSystemSync PERSISTENT test.");
+
+var fileSystem = requestFileSystemSync(PERSISTENT, 100);
+
+debug("Successfully obtained PERSISTENT FileSystem:" + fileSystem.name);
+shouldBeTrue("fileSystem.name.length > 0");
+shouldBe("fileSystem.root.fullPath", '"/"');
+finishJSTest();
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/filesystem/resources/simple-persistent.js b/LayoutTests/fast/filesystem/resources/simple-persistent.js
new file mode 100644
index 0000000..369f74a
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/simple-persistent.js
@@ -0,0 +1,20 @@
+description("requestFileSystem PERSISTENT test.");
+
+var fileSystem = null;
+
+function errorCallback(error) {
+    debug("Error occured while requesting a PERSISTENT file system:" + error.code);
+    finishJSTest();
+}
+
+function successCallback(fs) {
+    fileSystem = fs;
+    debug("Successfully obtained PERSISTENT FileSystem:" + fileSystem.name);
+    shouldBeTrue("fileSystem.name.length > 0");
+    shouldBe("fileSystem.root.fullPath", '"/"');
+    finishJSTest();
+}
+
+var jsTestIsAsync = true;
+requestFileSystem(PERSISTENT, 100, successCallback, errorCallback);
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/filesystem/resources/simple-temporary-sync.js b/LayoutTests/fast/filesystem/resources/simple-temporary-sync.js
new file mode 100644
index 0000000..a33f1d9
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/simple-temporary-sync.js
@@ -0,0 +1,9 @@
+description("requestFileSystemSync TEMPORARY test.");
+
+var fileSystem = requestFileSystemSync(TEMPORARY, 100);
+
+debug("Successfully obtained TEMPORARY FileSystem:" + fileSystem.name);
+shouldBeTrue("fileSystem.name.length > 0");
+shouldBe("fileSystem.root.fullPath", '"/"');
+finishJSTest();
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/filesystem/resources/simple-temporary.js b/LayoutTests/fast/filesystem/resources/simple-temporary.js
new file mode 100644
index 0000000..148685c
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/simple-temporary.js
@@ -0,0 +1,20 @@
+description("requestFileSystem TEMPORARY test.");
+
+var fileSystem = null;
+
+function errorCallback(error) {
+    debug('Error occured while requesting a TEMPORARY file system:' + error.code);
+    finishJSTest();
+}
+
+function successCallback(fs) {
+    fileSystem = fs;
+    debug("Successfully obtained TEMPORARY FileSystem:" + fileSystem.name);
+    shouldBeTrue("fileSystem.name.length > 0");
+    shouldBe("fileSystem.root.fullPath", '"/"');
+    finishJSTest();
+}
+
+var jsTestIsAsync = true;
+requestFileSystem(TEMPORARY, 100, successCallback, errorCallback);
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/filesystem/script-tests/flags-passing.js b/LayoutTests/fast/filesystem/script-tests/flags-passing.js
index 0789a99..dbfeede 100644
--- a/LayoutTests/fast/filesystem/script-tests/flags-passing.js
+++ b/LayoutTests/fast/filesystem/script-tests/flags-passing.js
@@ -12,7 +12,8 @@ var testsList = [
     'runObjectTestWithExclusive',
     'cleanupAndRunNext',
     'runJSONTest',
-    'runJSONTestWithExclusive'
+    'runJSONTestWithExclusive',
+    'runNullTest'
 ];
 var testCounter = 0;
 
@@ -32,6 +33,13 @@ function errorCallback(error) {
 }
 
 // Test body functions ----------------------------------------------------
+function runNullTest(v) {
+    debug("* Passing null as a Flags parameter.");
+
+    // This should be ok and we treat it as {false, false} Flags.
+    fileSystem.root.getFile(testFileName, null, runNextTest, errorCallback);
+}
+
 function runObjectTest(v) {
     debug("* Passing a Flags object.");
     var flags = new Flags();
diff --git a/LayoutTests/fast/filesystem/simple-persistent-expected.txt b/LayoutTests/fast/filesystem/simple-persistent-expected.txt
new file mode 100644
index 0000000..2042b11
--- /dev/null
+++ b/LayoutTests/fast/filesystem/simple-persistent-expected.txt
@@ -0,0 +1,12 @@
+requestFileSystem PERSISTENT test.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Successfully obtained PERSISTENT FileSystem:TestShellFileSystem
+PASS fileSystem.name.length > 0 is true
+PASS fileSystem.root.fullPath is "/"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/simple-persistent.html b/LayoutTests/fast/filesystem/simple-persistent.html
new file mode 100644
index 0000000..f177c26
--- /dev/null
+++ b/LayoutTests/fast/filesystem/simple-persistent.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/simple-persistent.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/simple-temporary-expected.txt b/LayoutTests/fast/filesystem/simple-temporary-expected.txt
new file mode 100644
index 0000000..4a8d46f
--- /dev/null
+++ b/LayoutTests/fast/filesystem/simple-temporary-expected.txt
@@ -0,0 +1,12 @@
+requestFileSystem TEMPORARY test.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Successfully obtained TEMPORARY FileSystem:TestShellFileSystem
+PASS fileSystem.name.length > 0 is true
+PASS fileSystem.root.fullPath is "/"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/simple-temporary.html b/LayoutTests/fast/filesystem/simple-temporary.html
new file mode 100644
index 0000000..5462ac6
--- /dev/null
+++ b/LayoutTests/fast/filesystem/simple-temporary.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/simple-temporary.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt b/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt
new file mode 100644
index 0000000..3fc55dd
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt
@@ -0,0 +1,11 @@
+This tests requesting PERSISTENT FileSystem in Worker.
+
+Starting worker: ../resources/simple-persistent.js
+Description: requestFileSystem PERSISTENT test.
+Successfully obtained PERSISTENT FileSystem:file__0:Temporary
+PASS: fileSystem.name.length > 0 is true
+PASS: fileSystem.root.fullPath is "/"
+DONE
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt b/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt
new file mode 100644
index 0000000..23ebfbd
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt
@@ -0,0 +1,8 @@
+This tests requesting PERSISTENT FileSystemSync in Worker.
+
+Starting worker: ../resources/simple-persistent-sync.js
+Description: requestFileSystemSync PERSISTENT test.
+Got error from worker: Uncaught ReferenceError: requestFileSystemSync is not defined
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html b/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html
new file mode 100644
index 0000000..f2f4f66
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script src="../resources/fs-worker-common.js"></script>
+<script src="../resources/fs-worker-test-pre.js"></script>
+</head>
+<body>
+<p id="description">This tests requesting PERSISTENT FileSystemSync in Worker.</p>
+<div id="console"></div>
+<script>
+startWorker('../resources/simple-persistent-sync.js');
+</script>
+<script src="../resources/fs-worker-test-post.js"></script>
+</body>
+</html>
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent-sync.txt b/LayoutTests/fast/filesystem/workers/simple-persistent-sync.txt
new file mode 100644
index 0000000..19ed6c5
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent-sync.txt
@@ -0,0 +1,12 @@
+This tests requesting PERSISTENT FileSystemSync in Worker.
+
+Starting worker: ../resources/simple-persistent-sync.js
+Worker started.
+Successfully obtained PERSISTENT FileSystem:http_localhost_8080:Persistent
+PASS: fileSystem.name.length > 0 is true
+PASS: fileSystem.root.fullPath is "/"
+DONE
+
+TEST COMPLETE
+
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent.html b/LayoutTests/fast/filesystem/workers/simple-persistent.html
new file mode 100644
index 0000000..a15bb84
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script src="../resources/fs-worker-common.js"></script>
+<script src="../resources/fs-worker-test-pre.js"></script>
+</head>
+<body>
+<p id="description">This tests requesting PERSISTENT FileSystem in Worker.</p>
+<div id="console"></div>
+<script>
+startWorker('../resources/simple-persistent.js');
+</script>
+<script src="../resources/fs-worker-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt b/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt
new file mode 100644
index 0000000..ac83df5
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt
@@ -0,0 +1,11 @@
+This tests requesting TEMPORARY FileSystem in Worker.
+
+Starting worker: ../resources/simple-temporary.js
+Description: requestFileSystem TEMPORARY test.
+Successfully obtained TEMPORARY FileSystem:file__0:Temporary
+PASS: fileSystem.name.length > 0 is true
+PASS: fileSystem.root.fullPath is "/"
+DONE
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt b/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt
new file mode 100644
index 0000000..0e21c02
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt
@@ -0,0 +1,8 @@
+This tests requesting TEMPORARY FileSystemSync in Worker.
+
+Starting worker: ../resources/simple-temporary-sync.js
+Description: requestFileSystemSync TEMPORARY test.
+Got error from worker: Uncaught ReferenceError: requestFileSystemSync is not defined
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html b/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html
new file mode 100644
index 0000000..121613a
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script src="../resources/fs-worker-common.js"></script>
+<script src="../resources/fs-worker-test-pre.js"></script>
+</head>
+<body>
+<p id="description">This tests requesting TEMPORARY FileSystemSync in Worker.</p>
+<div id="console"></div>
+<script>
+startWorker('../resources/simple-temporary-sync.js');
+</script>
+<script src="../resources/fs-worker-test-post.js"></script>
+</body>
+</html>
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary.html b/LayoutTests/fast/filesystem/workers/simple-temporary.html
new file mode 100644
index 0000000..d08a327
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script src="../resources/fs-worker-common.js"></script>
+<script src="../resources/fs-worker-test-pre.js"></script>
+</head>
+<body>
+<p id="description">This tests requesting TEMPORARY FileSystem in Worker.</p>
+<div id="console"></div>
+<script>
+startWorker('../resources/simple-temporary.js');
+</script>
+<script src="../resources/fs-worker-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/js/resources/fs-test-post.js b/LayoutTests/fast/js/resources/fs-test-post.js
new file mode 100644
index 0000000..6d84656
--- /dev/null
+++ b/LayoutTests/fast/js/resources/fs-test-post.js
@@ -0,0 +1,6 @@
+wasPostTestScriptParsed = true;
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+if (window.wasFinishJSTestCalled)
+    finishJSTest();
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 4bf9ae6..5d68678 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -158,6 +158,7 @@ WONTFIX SKIP : fast/regex/test1.html = PASS
 // We use worker_uitests to run workers tests. Don't run them in test_shell.
 WONTFIX SKIP : fast/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : fast/files/workers = PASS TIMEOUT FAIL
+WONTFIX SKIP : fast/filesystem/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/xmlhttprequest/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/eventsource/workers = PASS TIMEOUT FAIL
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 4476116..26ce547 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1632,14 +1632,23 @@ ENDIF ()
 if (ENABLE_FILE_SYSTEM)
     LIST(APPEND WebCore_SOURCES
         bindings/js/JSDirectoryEntryCustom.cpp
+        bindings/js/JSDirectoryEntrySyncCustom.cpp
         bindings/js/JSEntryCustom.cpp
+        bindings/js/JSEntrySyncCustom.cpp
         fileapi/DirectoryEntry.cpp
+        fileapi/DirectoryEntrySync.cpp
         fileapi/DirectoryReader.cpp
+        fileapi/DirectoryReaderSync.cpp
         fileapi/DOMFilePath.cpp
         fileapi/DOMFileSystem.cpp
+        fileapi/DOMFileSystemBase.cpp
+        fileapi/DOMFileSystemSync.cpp
         fileapi/Entry.cpp
         fileapi/EntryArray.cpp
+        fileapi/EntryArraySync.cpp
+        fileapi/EntrySync.cpp
         fileapi/FileEntry.cpp
+        fileapi/FileEntrySync.cpp
         fileapi/FileSystemCallbacks.cpp
         fileapi/FileWriter.cpp
         fileapi/LocalFileSystem.cpp
@@ -1647,15 +1656,21 @@ if (ENABLE_FILE_SYSTEM)
     )
     LIST(APPEND WebCore_IDL_FILES
         fileapi/DirectoryEntry.idl
+        fileapi/DirectoryEntrySync.idl
         fileapi/DirectoryReader.idl
+        fileapi/DirectoryReaderSync.idl
         fileapi/DOMFileSystem.idl
+        fileapi/DOMFileSystemSync.idl
         fileapi/EntriesCallback.idl
         fileapi/Entry.idl
+        fileapi/EntrySync.idl
         fileapi/EntryArray.idl
+        fileapi/EntryArraySync.idl
         fileapi/EntryCallback.idl
         fileapi/ErrorCallback.idl
         fileapi/FileCallback.idl
         fileapi/FileEntry.idl
+        fileapi/FileEntrySync.idl
         fileapi/FileSystemCallback.idl
         fileapi/FileWriterCallback.idl
         fileapi/FileWriter.idl
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b5030c1..0933f39 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,55 @@
+2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by David Levin.
+
+        Add idl and mock classes for FileSystemSync for FileSystem API
+        https://bugs.webkit.org/show_bug.cgi?id=46405
+
+        Added bunch of *Sync classes, plus refactored some classes:
+        Added DOMFileSystemBase as a common base class for DOMFileSystem and
+        DOMFileSystemSync.
+        Added EntryBase as a common base class for Entry and EntrySync.
+        Added DirectoryReaderBase as a common base class for DirectoryReader and
+        DirectoryReaderSync.
+
+        Test: fast/filesystem/workers/
+
+        * CMakeLists.txt: Added new files.
+        * DerivedSources.cpp: Added new files.
+        * DerivedSources.make: Added new files.
+        * GNUmakefile.am: Added new files.
+        * WebCore.gypi: Added new files.
+        * WebCore.pri: Added new files.
+        * WebCore.pro: Added new files.
+        * WebCore.vcproj/WebCore.vcproj: Added new files. Also removed the duplicated fileapi\FileEntry.cpp entry.
+        * WebCore.xcodeproj/project.pbxproj: Added new files.
+        * bindings/js/JSDirectoryEntrySyncCustom.cpp: Added.
+        * bindings/js/JSEntrySyncCustom.cpp: Added.
+        * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: Added.
+        * bindings/v8/custom/V8EntrySyncCustom.cpp: Added.
+        * fileapi/DOMFileSystemBase.cpp: Added.
+        * fileapi/DOMFileSystemBase.h: Added.
+        * fileapi/DOMFileSystemSync.cpp: Added.
+        * fileapi/DOMFileSystemSync.h: Added.
+        * fileapi/DOMFileSystemSync.idl: Added.
+        * fileapi/DirectoryEntrySync.cpp: Added.
+        * fileapi/DirectoryEntrySync.h: Added.
+        * fileapi/DirectoryEntrySync.idl: Added.
+        * fileapi/DirectoryReaderBase.h: Added.
+        * fileapi/DirectoryReaderSync.cpp: Added.
+        * fileapi/DirectoryReaderSync.h: Added.
+        * fileapi/DirectoryReaderSync.idl: Added.
+        * fileapi/EntryArraySync.cpp: Added.
+        * fileapi/EntryArraySync.h: Added.
+        * fileapi/EntryArraySync.idl: Added.
+        * fileapi/EntryBase.h: Added.
+        * fileapi/EntrySync.cpp: Added.
+        * fileapi/EntrySync.h: Added.
+        * fileapi/EntrySync.idl: Added.
+        * fileapi/FileEntrySync.cpp: Added.
+        * fileapi/FileEntrySync.h: Added.
+        * fileapi/FileEntrySync.idl: Added.
+
 2010-10-05  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index 898da5c..01f5023 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -74,13 +74,16 @@
 #include "JSDedicatedWorkerContext.cpp"
 #include "JSDeviceOrientationEvent.cpp"
 #include "JSDirectoryEntry.cpp"
+#include "JSDirectoryEntrySync.cpp"
 #include "JSDirectoryReader.cpp"
+#include "JSDirectoryReaderSync.cpp"
 #include "JSDocument.cpp"
 #include "JSDocumentFragment.cpp"
 #include "JSDocumentType.cpp"
 #include "JSDOMApplicationCache.cpp"
 #include "JSDOMCoreException.cpp"
 #include "JSDOMFileSystem.cpp"
+#include "JSDOMFileSystemSync.cpp"
 #include "JSDOMFormData.cpp"
 #include "JSDOMImplementation.cpp"
 #include "JSDOMMimeType.cpp"
@@ -99,6 +102,8 @@
 #include "JSEntriesCallback.cpp"
 #include "JSEntry.cpp"
 #include "JSEntryArray.cpp"
+#include "JSEntryArraySync.cpp"
+#include "JSEntrySync.cpp"
 #include "JSEntryCallback.cpp"
 #include "JSErrorCallback.cpp"
 #include "JSErrorEvent.cpp"
@@ -108,6 +113,7 @@
 #include "JSFile.cpp"
 #include "JSFileCallback.cpp"
 #include "JSFileEntry.cpp"
+#include "JSFileEntrySync.cpp"
 #include "JSFileError.cpp"
 #include "JSFileException.cpp"
 #include "JSFileList.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 2fda5e9..342bb7b 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -114,6 +114,7 @@ DOM_CLASSES = \
     DOMApplicationCache \
     DOMCoreException \
     DOMFileSystem \
+    DOMFileSystemSync \
     DOMFormData \
     DOMImplementation \
     DOMMimeType \
@@ -132,7 +133,9 @@ DOM_CLASSES = \
     DeviceMotionEvent \
     DeviceOrientationEvent \
     DirectoryEntry \
+    DirectoryEntrySync \
     DirectoryReader \
+    DirectoryReaderSync \
     Document \
     DocumentFragment \
     DocumentType \
@@ -142,7 +145,9 @@ DOM_CLASSES = \
     EntityReference \
     EntriesCallback \
     Entry \
+    EntrySync \
     EntryArray \
+    EntryArraySync \
     EntryCallback \
     ErrorCallback \
     ErrorEvent \
@@ -154,6 +159,7 @@ DOM_CLASSES = \
     File \
     FileCallback \
     FileEntry \
+    FileEntrySync \
     FileException \
     FileError \
     FileList \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index b9c5b5a..133217a 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -689,6 +689,7 @@ webcore_sources += \
 	WebCore/bindings/js/JSDeviceMotionEventCustom.cpp \
 	WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp \
 	WebCore/bindings/js/JSDirectoryEntryCustom.cpp \
+	WebCore/bindings/js/JSDirectoryEntrySyncCustom.cpp \
 	WebCore/bindings/js/JSDocumentCustom.cpp \
 	WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp \
 	WebCore/bindings/js/JSDOMBinding.cpp \
@@ -711,6 +712,7 @@ webcore_sources += \
 	WebCore/bindings/js/JSDOMWrapper.h \
 	WebCore/bindings/js/JSElementCustom.cpp \
 	WebCore/bindings/js/JSEntryCustom.cpp \
+	WebCore/bindings/js/JSEntrySyncCustom.cpp \
 	WebCore/bindings/js/JSEventCustom.cpp \
 	WebCore/bindings/js/JSEventListener.cpp \
 	WebCore/bindings/js/JSEventListener.h \
@@ -1366,23 +1368,38 @@ webcore_sources += \
 	WebCore/fileapi/BlobURL.h \
 	WebCore/fileapi/DirectoryEntry.cpp \
 	WebCore/fileapi/DirectoryEntry.h \
+	WebCore/fileapi/DirectoryEntrySync.cpp \
+	WebCore/fileapi/DirectoryEntrySync.h \
 	WebCore/fileapi/DirectoryReader.cpp \
 	WebCore/fileapi/DirectoryReader.h \
+	WebCore/fileapi/DirectoryReaderSync.cpp \
+	WebCore/fileapi/DirectoryReaderSync.h \
 	WebCore/fileapi/DOMFilePath.cpp \
 	WebCore/fileapi/DOMFilePath.h \
 	WebCore/fileapi/DOMFileSystem.cpp \
 	WebCore/fileapi/DOMFileSystem.h \
+	WebCore/fileapi/DOMFileSystemBase.cpp \
+	WebCore/fileapi/DOMFileSystemBase.h \
+	WebCore/fileapi/DOMFileSystemSync.cpp \
+	WebCore/fileapi/DOMFileSystemSync.h \
 	WebCore/fileapi/EntriesCallback.h \
+	WebCore/fileapi/Entry.cpp \
+	WebCore/fileapi/Entry.h \
 	WebCore/fileapi/EntryArray.cpp \
 	WebCore/fileapi/EntryArray.h \
+	WebCore/fileapi/EntryArraySync.cpp \
+	WebCore/fileapi/EntryArraySync.h \
+	WebCore/fileapi/EntryBase.h \
 	WebCore/fileapi/EntryCallback.h \
-	WebCore/fileapi/Entry.cpp \
-	WebCore/fileapi/Entry.h \
+	WebCore/fileapi/EntrySync.cpp \
+	WebCore/fileapi/EntrySync.h \
 	WebCore/fileapi/ErrorCallback.h \
 	WebCore/fileapi/FileCallback.h \
 	WebCore/fileapi/File.cpp \
 	WebCore/fileapi/FileEntry.cpp \
 	WebCore/fileapi/FileEntry.h \
+	WebCore/fileapi/FileEntrySync.cpp \
+	WebCore/fileapi/FileEntrySync.h \
 	WebCore/fileapi/FileError.h \
 	WebCore/fileapi/FileException.h \
 	WebCore/fileapi/File.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index ec62ab6..1f3355b 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -89,16 +89,22 @@
             'fileapi/Blob.idl',
             'fileapi/BlobBuilder.idl',
             'fileapi/DirectoryEntry.idl',
+            'fileapi/DirectoryEntrySync.idl',
             'fileapi/DirectoryReader.idl',
+            'fileapi/DirectoryReaderSync.idl',
             'fileapi/DOMFileSystem.idl',
+            'fileapi/DOMFileSystemSync.idl',
             'fileapi/EntriesCallback.idl',
             'fileapi/Entry.idl',
             'fileapi/EntryArray.idl',
+            'fileapi/EntryArraySync.idl',
             'fileapi/EntryCallback.idl',
+            'fileapi/EntrySync.idl',
             'fileapi/ErrorCallback.idl',
             'fileapi/File.idl',
             'fileapi/FileCallback.idl',
             'fileapi/FileEntry.idl',
+            'fileapi/FileEntrySync.idl',
             'fileapi/FileError.idl',
             'fileapi/FileException.idl',
             'fileapi/FileList.idl',
@@ -567,6 +573,7 @@
             'bindings/js/JSDeviceMotionEventCustom.cpp',
             'bindings/js/JSDeviceOrientationEventCustom.cpp',
             'bindings/js/JSDirectoryEntryCustom.cpp',
+            'bindings/js/JSDirectoryEntrySyncCustom.cpp',
             'bindings/js/JSDocumentCustom.cpp',
             'bindings/js/JSDOMApplicationCacheCustom.cpp',
             'bindings/js/JSDOMBinding.cpp',
@@ -585,6 +592,7 @@
             'bindings/js/JSDOMWrapper.h',
             'bindings/js/JSElementCustom.cpp',
             'bindings/js/JSEntryCustom.cpp',
+            'bindings/js/JSEntrySyncCustom.cpp',
             'bindings/js/JSEventCustom.cpp',
             'bindings/js/JSEventListener.cpp',
             'bindings/js/JSEventListener.h',
@@ -765,6 +773,7 @@
             'bindings/v8/custom/V8DeviceMotionEventCustom.cpp',
             'bindings/v8/custom/V8DeviceOrientationEventCustom.cpp',
             'bindings/v8/custom/V8DirectoryEntryCustom.cpp',
+            'bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp',
             'bindings/v8/custom/V8DocumentLocationCustom.cpp',
             'bindings/v8/custom/V8DOMFormDataCustom.cpp',
             'bindings/v8/custom/V8DOMStringMapCustom.cpp',
@@ -773,6 +782,7 @@
             'bindings/v8/custom/V8DocumentCustom.cpp',
             'bindings/v8/custom/V8ElementCustom.cpp',
             'bindings/v8/custom/V8EntryCustom.cpp',
+            'bindings/v8/custom/V8EntrySyncCustom.cpp',
             'bindings/v8/custom/V8EventCustom.cpp',
             'bindings/v8/custom/V8EventSourceConstructor.cpp',
             'bindings/v8/custom/V8GeolocationCustom.cpp',
@@ -1452,24 +1462,41 @@
             'fileapi/BlobURL.h',
             'fileapi/DirectoryEntry.cpp',
             'fileapi/DirectoryEntry.h',
+            'fileapi/DirectoryEntrySync.cpp',
+            'fileapi/DirectoryEntrySync.h',
             'fileapi/DirectoryReader.cpp',
             'fileapi/DirectoryReader.h',
+            'fileapi/DirectoryReaderBase.h',
+            'fileapi/DirectoryReaderSync.cpp',
+            'fileapi/DirectoryReaderSync.h',
             'fileapi/DOMFilePath.cpp',
             'fileapi/DOMFilePath.h',
             'fileapi/DOMFileSystem.cpp',
             'fileapi/DOMFileSystem.h',
+            'fileapi/DOMFileSystemBase.cpp',
+            'fileapi/DOMFileSystemBase.h',
+            'fileapi/DOMFileSystemSync.cpp',
+            'fileapi/DOMFileSystemSync.h',
             'fileapi/EntriesCallback.h',
             'fileapi/Entry.cpp',
             'fileapi/Entry.h',
+            'fileapi/EntryBase.h',
             'fileapi/EntryArray.cpp',
             'fileapi/EntryArray.h',
+            'fileapi/EntryArraySync.cpp',
+            'fileapi/EntryArraySync.h',
             'fileapi/EntryCallback.h',
+            'fileapi/EntryBase.h',
+            'fileapi/EntrySync.cpp',
+            'fileapi/EntrySync.h',
             'fileapi/ErrorCallback.h',
             'fileapi/File.cpp',
             'fileapi/File.h',
             'fileapi/FileCallback.h',
             'fileapi/FileEntry.cpp',
             'fileapi/FileEntry.h',
+            'fileapi/FileEntrySync.cpp',
+            'fileapi/FileEntrySync.h',
             'fileapi/FileError.h',
             'fileapi/FileException.h',
             'fileapi/FileList.cpp',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 3331626..051f4d9 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -156,16 +156,22 @@ IDL_BINDINGS += \
     fileapi/Blob.idl \
     fileapi/BlobBuilder.idl \
     fileapi/DirectoryEntry.idl \
+    fileapi/DirectoryEntrySync.idl \
     fileapi/DirectoryReader.idl \
+    fileapi/DirectoryReaderSync.idl \
     fileapi/DOMFileSystem.idl \
+    fileapi/DOMFileSystemSync.idl \
     fileapi/EntriesCallback.idl \
     fileapi/Entry.idl \
     fileapi/EntryArray.idl \
+    fileapi/EntryArraySync.idl \
     fileapi/EntryCallback.idl \
+    fileapi/EntrySync.idl \
     fileapi/ErrorCallback.idl \
     fileapi/File.idl \
     fileapi/FileCallback.idl \
     fileapi/FileEntry.idl \
+    fileapi/FileEntrySync.idl \
     fileapi/FileError.idl \
     fileapi/FileList.idl \
     fileapi/FileReader.idl \
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index f774c95..37d7a46 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2974,16 +2974,25 @@ contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
     HEADERS += \
         fileapi/AsyncFileWriter.h \
         fileapi/DirectoryEntry.h \
+        fileapi/DirectoryEntrySync.h \
         fileapi/DirectoryReader.h \
+        fileapi/DirectoryReaderBase.h \
+        fileapi/DirectoryReaderSync.h \
         fileapi/DOMFilePath.h \
         fileapi/DOMFileSystem.h \
+        fileapi/DOMFileSystemBase.h \
+        fileapi/DOMFileSystemSync.h \
         fileapi/EntriesCallback.h \
         fileapi/Entry.h \
         fileapi/EntryArray.h \
+        fileapi/EntryArraySync.h \
+        fileapi/EntryBase.h \
         fileapi/EntryCallback.h \
+        fileapi/EntrySync.h \
         fileapi/ErrorCallback.h \
         fileapi/FileCallback.h \
         fileapi/FileEntry.h \
+        fileapi/FileEntrySync.h \
         fileapi/FileSystemCallback.h \
         fileapi/FileSystemCallbacks.h \
         fileapi/FileWriter.h \
@@ -2998,14 +3007,23 @@ contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
 
     SOURCES += \
         bindings/js/JSDirectoryEntryCustom.cpp \
+        bindings/js/JSDirectoryEntrySyncCustom.cpp \
         bindings/js/JSEntryCustom.cpp \
+        bindings/js/JSEntrySyncCustom.cpp \
         fileapi/DirectoryEntry.cpp \
+        fileapi/DirectoryEntrySync.cpp \
         fileapi/DirectoryReader.cpp \
+        fileapi/DirectoryReaderSync.cpp \
         fileapi/DOMFilePath.cpp \
         fileapi/DOMFileSystem.cpp \
+        fileapi/DOMFileSystemBase.cpp \
+        fileapi/DOMFileSystemSync.cpp \
         fileapi/Entry.cpp \
         fileapi/EntryArray.cpp \
+        fileapi/EntryArraySync.cpp \
+        fileapi/EntrySync.cpp \
         fileapi/FileEntry.cpp \
+        fileapi/FileEntrySync.cpp \
         fileapi/FileSystemCallbacks.cpp \
         fileapi/FileWriter.cpp \
         fileapi/LocalFileSystem.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 8c326bb..76f6446 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -3095,6 +3095,14 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDirectoryEntrySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDirectoryEntrySync.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDirectoryReader.cpp"
 				>
 				<FileConfiguration
@@ -3151,6 +3159,14 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDirectoryReaderSync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDirectoryReaderSync.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDocument.cpp"
 				>
 				<FileConfiguration
@@ -3487,6 +3503,14 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMFileSystemSync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMFileSystemSync.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMFormData.cpp"
 				>
 				<FileConfiguration
@@ -4499,6 +4523,14 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEntryArraySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEntryArraySync.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEntryCallback.cpp"
 				>
 				<FileConfiguration
@@ -4555,6 +4587,14 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEntrySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEntrySync.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSErrorCallback.cpp"
 				>
 				<FileConfiguration
@@ -4951,6 +4991,22 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileEntry.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileEntry.h"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileEntrySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileEntrySync.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileError.h"
 				>
 			</File>
@@ -37687,6 +37743,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\fileapi\DirectoryEntrySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\DirectoryEntrySync.h"
+				>
+			</File>
+			<File
 				RelativePath="..\fileapi\DirectoryReader.cpp"
 				>
 			</File>
@@ -37695,6 +37759,18 @@
 				>
 			</File>
 			<File
+				RelativePath="..\fileapi\DirectoryReaderBase.h"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\DirectoryReaderSync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\DirectoryReaderSync.h"
+				>
+			</File>
+			<File
 				RelativePath="..\html\DOMDataGridDataSource.cpp"
 				>
 			</File>
@@ -37719,6 +37795,22 @@
 				>
 			</File>
 			<File
+				RelativePath="..\fileapi\DOMFileSystemBase.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\DOMFileSystemBase.h"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\DOMFileSystemSync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\DOMFileSystemSync.h"
+				>
+			</File>
+			<File
 				RelativePath="..\html\DOMFormData.cpp"
 				>
 			</File>
@@ -37763,6 +37855,26 @@
 				>
 			</File>
 			<File
+				RelativePath="..\fileapi\EntryArraySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\EntryArraySync.h"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\EntryBase.h"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\EntrySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\EntrySync.h"
+				>
+			</File>
+			<File
 				RelativePath="..\fileapi\EntryCallback.h"
 				>
 			</File>
@@ -37787,11 +37899,15 @@
 				>
 			</File>
 			<File
-				RelativePath="..\fileapi\FileEntry.cpp"
+				RelativePath="..\fileapi\FileEntry.h"
 				>
 			</File>
 			<File
-				RelativePath="..\fileapi\FileEntry.h"
+				RelativePath="..\fileapi\FileEntrySync.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\fileapi\FileEntrySync.h"
 				>
 			</File>
 			<File
@@ -44330,6 +44446,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\bindings\js\JSDirectoryEntrySyncCustom.cpp"
+					>
+				</File>
+				<File
 					RelativePath="..\bindings\js\JSDocumentCustom.cpp"
 					>
 					<FileConfiguration
@@ -45090,6 +45210,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\bindings\js\JSEntrySyncCustom.cpp"
+					>
+				</File>
+				<File
 					RelativePath="..\bindings\js\JSEventCustom.cpp"
 					>
 					<FileConfiguration
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 35b4f51..8f1efe9 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2466,6 +2466,7 @@
 		85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */; };
 		85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */; };
 		86243D0111BC31F700CC006A /* JSArrayBufferViewHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */; };
+		890AE0E11256A07900F5968C /* DirectoryReaderBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 890AE0E01256A07900F5968C /* DirectoryReaderBase.h */; };
 		893C47A71238908B002B3D86 /* FileCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47A51238908B002B3D86 /* FileCallback.h */; };
 		893C47A81238908B002B3D86 /* FileWriterCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47A61238908B002B3D86 /* FileWriterCallback.h */; };
 		893C47B71238A099002B3D86 /* JSFileCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47B51238A099002B3D86 /* JSFileCallback.cpp */; };
@@ -2474,6 +2475,35 @@
 		893C47BC1238A0A9002B3D86 /* JSFileWriterCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47BA1238A0A9002B3D86 /* JSFileWriterCallback.h */; };
 		893C47CC123EEBA2002B3D86 /* JSEntryCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47CA123EEBA2002B3D86 /* JSEntryCustom.cpp */; };
 		893C47DF123EF4A9002B3D86 /* JSDirectoryEntryCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47DE123EF4A9002B3D86 /* JSDirectoryEntryCustom.cpp */; };
+		893C48001248BD3A002B3D86 /* DirectoryEntrySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47F01248BD39002B3D86 /* DirectoryEntrySync.cpp */; };
+		893C48011248BD3A002B3D86 /* DirectoryEntrySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47F11248BD39002B3D86 /* DirectoryEntrySync.h */; };
+		893C48021248BD3A002B3D86 /* DirectoryReaderSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47F21248BD39002B3D86 /* DirectoryReaderSync.cpp */; };
+		893C48031248BD3A002B3D86 /* DirectoryReaderSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47F31248BD39002B3D86 /* DirectoryReaderSync.h */; };
+		893C48041248BD3A002B3D86 /* DOMFileSystemBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47F41248BD39002B3D86 /* DOMFileSystemBase.cpp */; };
+		893C48051248BD3A002B3D86 /* DOMFileSystemBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47F51248BD39002B3D86 /* DOMFileSystemBase.h */; };
+		893C48061248BD3A002B3D86 /* DOMFileSystemSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47F61248BD39002B3D86 /* DOMFileSystemSync.cpp */; };
+		893C48071248BD3A002B3D86 /* DOMFileSystemSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47F71248BD39002B3D86 /* DOMFileSystemSync.h */; };
+		893C48081248BD3A002B3D86 /* EntryArraySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47F81248BD39002B3D86 /* EntryArraySync.cpp */; };
+		893C48091248BD3A002B3D86 /* EntryArraySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47F91248BD39002B3D86 /* EntryArraySync.h */; };
+		893C480B1248BD3A002B3D86 /* EntryBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47FB1248BD39002B3D86 /* EntryBase.h */; };
+		893C480C1248BD3A002B3D86 /* EntrySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47FC1248BD39002B3D86 /* EntrySync.cpp */; };
+		893C480D1248BD3A002B3D86 /* EntrySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47FD1248BD39002B3D86 /* EntrySync.h */; };
+		893C480E1248BD3A002B3D86 /* FileEntrySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C47FE1248BD39002B3D86 /* FileEntrySync.cpp */; };
+		893C480F1248BD3A002B3D86 /* FileEntrySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47FF1248BD39002B3D86 /* FileEntrySync.h */; };
+		893C48211249535B002B3D86 /* JSDirectoryEntrySyncCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C48201249535B002B3D86 /* JSDirectoryEntrySyncCustom.cpp */; };
+		893C483212495472002B3D86 /* JSDirectoryEntrySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C482612495472002B3D86 /* JSDirectoryEntrySync.cpp */; };
+		893C483312495472002B3D86 /* JSDirectoryEntrySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C482712495472002B3D86 /* JSDirectoryEntrySync.h */; };
+		893C483412495472002B3D86 /* JSDirectoryReaderSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C482812495472002B3D86 /* JSDirectoryReaderSync.cpp */; };
+		893C483512495472002B3D86 /* JSDirectoryReaderSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C482912495472002B3D86 /* JSDirectoryReaderSync.h */; };
+		893C483612495472002B3D86 /* JSDOMFileSystemSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C482A12495472002B3D86 /* JSDOMFileSystemSync.cpp */; };
+		893C483712495472002B3D86 /* JSDOMFileSystemSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C482B12495472002B3D86 /* JSDOMFileSystemSync.h */; };
+		893C483812495472002B3D86 /* JSEntryArraySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C482C12495472002B3D86 /* JSEntryArraySync.cpp */; };
+		893C483912495472002B3D86 /* JSEntryArraySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C482D12495472002B3D86 /* JSEntryArraySync.h */; };
+		893C483A12495472002B3D86 /* JSEntrySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C482E12495472002B3D86 /* JSEntrySync.cpp */; };
+		893C483B12495472002B3D86 /* JSEntrySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C482F12495472002B3D86 /* JSEntrySync.h */; };
+		893C483C12495472002B3D86 /* JSFileEntrySync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C483012495472002B3D86 /* JSFileEntrySync.cpp */; };
+		893C483D12495472002B3D86 /* JSFileEntrySync.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C483112495472002B3D86 /* JSFileEntrySync.h */; };
+		893C485312499B06002B3D86 /* JSEntrySyncCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 893C485212499B06002B3D86 /* JSEntrySyncCustom.cpp */; };
 		89878552122CA064003AABDA /* DirectoryEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878539122CA064003AABDA /* DirectoryEntry.cpp */; };
 		89878553122CA064003AABDA /* DirectoryEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987853A122CA064003AABDA /* DirectoryEntry.h */; };
 		89878554122CA064003AABDA /* DirectoryReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987853B122CA064003AABDA /* DirectoryReader.cpp */; };
@@ -8480,6 +8510,7 @@
 		85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEvent.h; sourceTree = "<group>"; };
 		85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = "<group>"; };
 		86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferViewHelper.h; sourceTree = "<group>"; };
+		890AE0E01256A07900F5968C /* DirectoryReaderBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryReaderBase.h; path = fileapi/DirectoryReaderBase.h; sourceTree = "<group>"; };
 		893C47A51238908B002B3D86 /* FileCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileCallback.h; path = fileapi/FileCallback.h; sourceTree = "<group>"; };
 		893C47A61238908B002B3D86 /* FileWriterCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriterCallback.h; path = fileapi/FileWriterCallback.h; sourceTree = "<group>"; };
 		893C47B51238A099002B3D86 /* JSFileCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileCallback.cpp; sourceTree = "<group>"; };
@@ -8488,6 +8519,35 @@
 		893C47BA1238A0A9002B3D86 /* JSFileWriterCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileWriterCallback.h; sourceTree = "<group>"; };
 		893C47CA123EEBA2002B3D86 /* JSEntryCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntryCustom.cpp; sourceTree = "<group>"; };
 		893C47DE123EF4A9002B3D86 /* JSDirectoryEntryCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryEntryCustom.cpp; sourceTree = "<group>"; };
+		893C47F01248BD39002B3D86 /* DirectoryEntrySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryEntrySync.cpp; path = fileapi/DirectoryEntrySync.cpp; sourceTree = "<group>"; };
+		893C47F11248BD39002B3D86 /* DirectoryEntrySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryEntrySync.h; path = fileapi/DirectoryEntrySync.h; sourceTree = "<group>"; };
+		893C47F21248BD39002B3D86 /* DirectoryReaderSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryReaderSync.cpp; path = fileapi/DirectoryReaderSync.cpp; sourceTree = "<group>"; };
+		893C47F31248BD39002B3D86 /* DirectoryReaderSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryReaderSync.h; path = fileapi/DirectoryReaderSync.h; sourceTree = "<group>"; };
+		893C47F41248BD39002B3D86 /* DOMFileSystemBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DOMFileSystemBase.cpp; path = fileapi/DOMFileSystemBase.cpp; sourceTree = "<group>"; };
+		893C47F51248BD39002B3D86 /* DOMFileSystemBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMFileSystemBase.h; path = fileapi/DOMFileSystemBase.h; sourceTree = "<group>"; };
+		893C47F61248BD39002B3D86 /* DOMFileSystemSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DOMFileSystemSync.cpp; path = fileapi/DOMFileSystemSync.cpp; sourceTree = "<group>"; };
+		893C47F71248BD39002B3D86 /* DOMFileSystemSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMFileSystemSync.h; path = fileapi/DOMFileSystemSync.h; sourceTree = "<group>"; };
+		893C47F81248BD39002B3D86 /* EntryArraySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EntryArraySync.cpp; path = fileapi/EntryArraySync.cpp; sourceTree = "<group>"; };
+		893C47F91248BD39002B3D86 /* EntryArraySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EntryArraySync.h; path = fileapi/EntryArraySync.h; sourceTree = "<group>"; };
+		893C47FB1248BD39002B3D86 /* EntryBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EntryBase.h; path = fileapi/EntryBase.h; sourceTree = "<group>"; };
+		893C47FC1248BD39002B3D86 /* EntrySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EntrySync.cpp; path = fileapi/EntrySync.cpp; sourceTree = "<group>"; };
+		893C47FD1248BD39002B3D86 /* EntrySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EntrySync.h; path = fileapi/EntrySync.h; sourceTree = "<group>"; };
+		893C47FE1248BD39002B3D86 /* FileEntrySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileEntrySync.cpp; path = fileapi/FileEntrySync.cpp; sourceTree = "<group>"; };
+		893C47FF1248BD39002B3D86 /* FileEntrySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileEntrySync.h; path = fileapi/FileEntrySync.h; sourceTree = "<group>"; };
+		893C48201249535B002B3D86 /* JSDirectoryEntrySyncCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryEntrySyncCustom.cpp; sourceTree = "<group>"; };
+		893C482612495472002B3D86 /* JSDirectoryEntrySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryEntrySync.cpp; sourceTree = "<group>"; };
+		893C482712495472002B3D86 /* JSDirectoryEntrySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDirectoryEntrySync.h; sourceTree = "<group>"; };
+		893C482812495472002B3D86 /* JSDirectoryReaderSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryReaderSync.cpp; sourceTree = "<group>"; };
+		893C482912495472002B3D86 /* JSDirectoryReaderSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDirectoryReaderSync.h; sourceTree = "<group>"; };
+		893C482A12495472002B3D86 /* JSDOMFileSystemSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFileSystemSync.cpp; sourceTree = "<group>"; };
+		893C482B12495472002B3D86 /* JSDOMFileSystemSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMFileSystemSync.h; sourceTree = "<group>"; };
+		893C482C12495472002B3D86 /* JSEntryArraySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntryArraySync.cpp; sourceTree = "<group>"; };
+		893C482D12495472002B3D86 /* JSEntryArraySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntryArraySync.h; sourceTree = "<group>"; };
+		893C482E12495472002B3D86 /* JSEntrySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntrySync.cpp; sourceTree = "<group>"; };
+		893C482F12495472002B3D86 /* JSEntrySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntrySync.h; sourceTree = "<group>"; };
+		893C483012495472002B3D86 /* JSFileEntrySync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileEntrySync.cpp; sourceTree = "<group>"; };
+		893C483112495472002B3D86 /* JSFileEntrySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileEntrySync.h; sourceTree = "<group>"; };
+		893C485212499B06002B3D86 /* JSEntrySyncCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntrySyncCustom.cpp; sourceTree = "<group>"; };
 		89878539122CA064003AABDA /* DirectoryEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryEntry.cpp; path = fileapi/DirectoryEntry.cpp; sourceTree = "<group>"; };
 		8987853A122CA064003AABDA /* DirectoryEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryEntry.h; path = fileapi/DirectoryEntry.h; sourceTree = "<group>"; };
 		8987853B122CA064003AABDA /* DirectoryReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryReader.cpp; path = fileapi/DirectoryReader.cpp; sourceTree = "<group>"; };
@@ -14216,18 +14276,28 @@
 				89CD029211C85B870070B791 /* JSBlobBuilder.h */,
 				89878586122CA26A003AABDA /* JSDirectoryEntry.cpp */,
 				89878587122CA26A003AABDA /* JSDirectoryEntry.h */,
+				893C482612495472002B3D86 /* JSDirectoryEntrySync.cpp */,
+				893C482712495472002B3D86 /* JSDirectoryEntrySync.h */,
 				89878588122CA26A003AABDA /* JSDirectoryReader.cpp */,
 				89878589122CA26A003AABDA /* JSDirectoryReader.h */,
+				893C482812495472002B3D86 /* JSDirectoryReaderSync.cpp */,
+				893C482912495472002B3D86 /* JSDirectoryReaderSync.h */,
 				8987858E122CA2A7003AABDA /* JSDOMFileSystem.cpp */,
 				8987858F122CA2A7003AABDA /* JSDOMFileSystem.h */,
+				893C482A12495472002B3D86 /* JSDOMFileSystemSync.cpp */,
+				893C482B12495472002B3D86 /* JSDOMFileSystemSync.h */,
 				89878590122CA2A7003AABDA /* JSEntriesCallback.cpp */,
 				89878591122CA2A7003AABDA /* JSEntriesCallback.h */,
 				89878592122CA2A7003AABDA /* JSEntry.cpp */,
 				89878593122CA2A7003AABDA /* JSEntry.h */,
 				89878594122CA2A7003AABDA /* JSEntryArray.cpp */,
 				89878595122CA2A7003AABDA /* JSEntryArray.h */,
+				893C482C12495472002B3D86 /* JSEntryArraySync.cpp */,
+				893C482D12495472002B3D86 /* JSEntryArraySync.h */,
 				89878596122CA2A7003AABDA /* JSEntryCallback.cpp */,
 				89878597122CA2A7003AABDA /* JSEntryCallback.h */,
+				893C482E12495472002B3D86 /* JSEntrySync.cpp */,
+				893C482F12495472002B3D86 /* JSEntrySync.h */,
 				89878598122CA2A7003AABDA /* JSErrorCallback.cpp */,
 				89878599122CA2A7003AABDA /* JSErrorCallback.h */,
 				BC00F0100E0A189500FD04E3 /* JSFile.cpp */,
@@ -14236,6 +14306,8 @@
 				893C47B61238A099002B3D86 /* JSFileCallback.h */,
 				8987859A122CA2A7003AABDA /* JSFileEntry.cpp */,
 				8987859B122CA2A7003AABDA /* JSFileEntry.h */,
+				893C483012495472002B3D86 /* JSFileEntrySync.cpp */,
+				893C483112495472002B3D86 /* JSFileEntrySync.h */,
 				2E3BC0C8117D3E0800B9409A /* JSFileError.cpp */,
 				2E3BC0C9117D3E0800B9409A /* JSFileError.h */,
 				898785EE122E1E87003AABDA /* JSFileException.cpp */,
@@ -14791,24 +14863,40 @@
 				976D6C60122B8A3D001FD1F7 /* BlobURL.h */,
 				89878539122CA064003AABDA /* DirectoryEntry.cpp */,
 				8987853A122CA064003AABDA /* DirectoryEntry.h */,
+				893C47F01248BD39002B3D86 /* DirectoryEntrySync.cpp */,
+				893C47F11248BD39002B3D86 /* DirectoryEntrySync.h */,
 				8987853B122CA064003AABDA /* DirectoryReader.cpp */,
 				8987853C122CA064003AABDA /* DirectoryReader.h */,
+				890AE0E01256A07900F5968C /* DirectoryReaderBase.h */,
+				893C47F21248BD39002B3D86 /* DirectoryReaderSync.cpp */,
+				893C47F31248BD39002B3D86 /* DirectoryReaderSync.h */,
 				8987853D122CA064003AABDA /* DOMFilePath.cpp */,
 				8987853E122CA064003AABDA /* DOMFilePath.h */,
 				8987853F122CA064003AABDA /* DOMFileSystem.cpp */,
 				89878540122CA064003AABDA /* DOMFileSystem.h */,
+				893C47F41248BD39002B3D86 /* DOMFileSystemBase.cpp */,
+				893C47F51248BD39002B3D86 /* DOMFileSystemBase.h */,
+				893C47F61248BD39002B3D86 /* DOMFileSystemSync.cpp */,
+				893C47F71248BD39002B3D86 /* DOMFileSystemSync.h */,
 				89878541122CA064003AABDA /* EntriesCallback.h */,
 				89878542122CA064003AABDA /* Entry.cpp */,
 				89878543122CA064003AABDA /* Entry.h */,
 				89878544122CA064003AABDA /* EntryArray.cpp */,
 				89878545122CA064003AABDA /* EntryArray.h */,
+				893C47F81248BD39002B3D86 /* EntryArraySync.cpp */,
+				893C47F91248BD39002B3D86 /* EntryArraySync.h */,
+				893C47FB1248BD39002B3D86 /* EntryBase.h */,
 				89878546122CA064003AABDA /* EntryCallback.h */,
+				893C47FC1248BD39002B3D86 /* EntrySync.cpp */,
+				893C47FD1248BD39002B3D86 /* EntrySync.h */,
 				89878547122CA064003AABDA /* ErrorCallback.h */,
 				976D6C61122B8A3D001FD1F7 /* File.cpp */,
 				976D6C62122B8A3D001FD1F7 /* File.h */,
 				893C47A51238908B002B3D86 /* FileCallback.h */,
 				89878548122CA064003AABDA /* FileEntry.cpp */,
 				89878549122CA064003AABDA /* FileEntry.h */,
+				893C47FE1248BD39002B3D86 /* FileEntrySync.cpp */,
+				893C47FF1248BD39002B3D86 /* FileEntrySync.h */,
 				976D6C64122B8A3D001FD1F7 /* FileError.h */,
 				2EDF369E122C94C8002F7D4E /* FileException.h */,
 				976D6C66122B8A3D001FD1F7 /* FileList.cpp */,
@@ -16735,6 +16823,7 @@
 				31FB1A6B120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp */,
 				590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */,
 				893C47DE123EF4A9002B3D86 /* JSDirectoryEntryCustom.cpp */,
+				893C48201249535B002B3D86 /* JSDirectoryEntrySyncCustom.cpp */,
 				49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */,
 				1AC226160DB69F740089B669 /* JSDOMApplicationCacheCustom.cpp */,
 				2E0888E5114884E200AF4265 /* JSDOMFormDataCustom.cpp */,
@@ -16746,6 +16835,7 @@
 				652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
 				BC2ED5540C6B9BD300920BFF /* JSElementCustom.cpp */,
 				893C47CA123EEBA2002B3D86 /* JSEntryCustom.cpp */,
+				893C485212499B06002B3D86 /* JSEntrySyncCustom.cpp */,
 				BCEFAF4D0C317E6900FA81F6 /* JSEventCustom.cpp */,
 				BC275B8011C5D2B400C9206C /* JSEventSourceCustom.cpp */,
 				49EECF7210508D9C00099FAB /* JSFloat32ArrayCustom.cpp */,
@@ -20961,6 +21051,21 @@
 				081668D4125603BF006F25DE /* SVGTextChunkBuilder.h in Headers */,
 				081668DA125603D5006F25DE /* SVGTextLayoutEngine.h in Headers */,
 				1AF8E11A1256592600230FF7 /* ProxyServer.h in Headers */,
+				893C48011248BD3A002B3D86 /* DirectoryEntrySync.h in Headers */,
+				893C48031248BD3A002B3D86 /* DirectoryReaderSync.h in Headers */,
+				893C48051248BD3A002B3D86 /* DOMFileSystemBase.h in Headers */,
+				893C48071248BD3A002B3D86 /* DOMFileSystemSync.h in Headers */,
+				893C48091248BD3A002B3D86 /* EntryArraySync.h in Headers */,
+				893C480B1248BD3A002B3D86 /* EntryBase.h in Headers */,
+				893C480D1248BD3A002B3D86 /* EntrySync.h in Headers */,
+				893C480F1248BD3A002B3D86 /* FileEntrySync.h in Headers */,
+				893C483312495472002B3D86 /* JSDirectoryEntrySync.h in Headers */,
+				893C483512495472002B3D86 /* JSDirectoryReaderSync.h in Headers */,
+				893C483712495472002B3D86 /* JSDOMFileSystemSync.h in Headers */,
+				893C483912495472002B3D86 /* JSEntryArraySync.h in Headers */,
+				893C483B12495472002B3D86 /* JSEntrySync.h in Headers */,
+				893C483D12495472002B3D86 /* JSFileEntrySync.h in Headers */,
+				890AE0E11256A07900F5968C /* DirectoryReaderBase.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -23491,6 +23596,21 @@
 				081668D9125603D5006F25DE /* SVGTextLayoutEngine.cpp in Sources */,
 				1AF8E13312565A4400230FF7 /* ProxyServer.cpp in Sources */,
 				1AF8E1C3125673E000230FF7 /* ProxyServerCFNet.cpp in Sources */,
+				893C48001248BD3A002B3D86 /* DirectoryEntrySync.cpp in Sources */,
+				893C48021248BD3A002B3D86 /* DirectoryReaderSync.cpp in Sources */,
+				893C48041248BD3A002B3D86 /* DOMFileSystemBase.cpp in Sources */,
+				893C48061248BD3A002B3D86 /* DOMFileSystemSync.cpp in Sources */,
+				893C48081248BD3A002B3D86 /* EntryArraySync.cpp in Sources */,
+				893C480C1248BD3A002B3D86 /* EntrySync.cpp in Sources */,
+				893C480E1248BD3A002B3D86 /* FileEntrySync.cpp in Sources */,
+				893C48211249535B002B3D86 /* JSDirectoryEntrySyncCustom.cpp in Sources */,
+				893C483212495472002B3D86 /* JSDirectoryEntrySync.cpp in Sources */,
+				893C483412495472002B3D86 /* JSDirectoryReaderSync.cpp in Sources */,
+				893C483612495472002B3D86 /* JSDOMFileSystemSync.cpp in Sources */,
+				893C483812495472002B3D86 /* JSEntryArraySync.cpp in Sources */,
+				893C483A12495472002B3D86 /* JSEntrySync.cpp in Sources */,
+				893C483C12495472002B3D86 /* JSFileEntrySync.cpp in Sources */,
+				893C485312499B06002B3D86 /* JSEntrySyncCustom.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/bindings/js/JSDirectoryEntrySyncCustom.cpp b/WebCore/bindings/js/JSDirectoryEntrySyncCustom.cpp
new file mode 100644
index 0000000..ef14b79
--- /dev/null
+++ b/WebCore/bindings/js/JSDirectoryEntrySyncCustom.cpp
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "JSDirectoryEntrySync.h"
+
+#include "JSDOMBinding.h"
+#include "JSEntryCallback.h"
+#include "JSErrorCallback.h"
+#include "JSFileEntrySync.h"
+#include "JSFlags.h"
+#include <wtf/Assertions.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+static PassRefPtr<Flags> getFlags(ExecState* exec, const JSValue& argument)
+{
+    if (argument.isNull() || argument.isUndefined() || !argument.isObject())
+        return 0;
+    if (argument.inherits(&JSFlags::s_info))
+        return toFlags(argument);
+
+    RefPtr<Flags> flags;
+    JSObject* object = argument.getObject();
+    flags = Flags::create();
+    JSValue jsCreate = object->get(exec, Identifier(exec, "create"));
+    flags->setCreate(jsCreate.toBoolean(exec));
+    JSValue jsExclusive = object->get(exec, Identifier(exec, "exclusive"));
+    flags->setExclusive(jsExclusive.toBoolean(exec));
+    return flags;
+}
+
+JSValue JSDirectoryEntrySync::getFile(ExecState* exec)
+{
+    DirectoryEntrySync* imp = static_cast<DirectoryEntrySync*>(impl());
+    const String& path = valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0));
+    if (exec->hadException())
+        return jsUndefined();
+
+    RefPtr<Flags> flags = getFlags(exec, exec->argument(1));
+    if (exec->hadException())
+        return jsUndefined();
+
+    ExceptionCode ec = 0;
+    JSC::JSValue result = toJS(exec, this->globalObject(), WTF::getPtr(imp->getFile(path, flags, ec)));
+    setDOMException(exec, ec);
+    return result;
+}
+
+JSValue JSDirectoryEntrySync::getDirectory(ExecState* exec)
+{
+    DirectoryEntrySync* imp = static_cast<DirectoryEntrySync*>(impl());
+    const String& path = valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0));
+    if (exec->hadException())
+        return jsUndefined();
+
+    RefPtr<Flags> flags = getFlags(exec, exec->argument(1));
+    if (exec->hadException())
+        return jsUndefined();
+
+    ExceptionCode ec = 0;
+    JSC::JSValue result = toJS(exec, this->globalObject(), WTF::getPtr(imp->getDirectory(path, flags, ec)));
+    setDOMException(exec, ec);
+    return result;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/bindings/js/JSEntrySyncCustom.cpp b/WebCore/bindings/js/JSEntrySyncCustom.cpp
new file mode 100644
index 0000000..22f96ad
--- /dev/null
+++ b/WebCore/bindings/js/JSEntrySyncCustom.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "JSEntrySync.h"
+
+#include "EntrySync.h"
+#include "JSDOMBinding.h"
+#include "JSDirectoryEntrySync.h"
+#include "JSFileEntrySync.h"
+#include <wtf/Assertions.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EntrySync* entry)
+{
+    if (!entry)
+        return jsNull();
+
+    if (entry->isFile())
+        return getDOMObjectWrapper<JSFileEntrySync>(exec, globalObject, static_cast<FileEntrySync*>(entry));
+
+    ASSERT(entry->isDirectory());
+    return getDOMObjectWrapper<JSDirectoryEntrySync>(exec, globalObject, static_cast<DirectoryEntrySync*>(entry));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp b/WebCore/bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp
new file mode 100644
index 0000000..90b3d13
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8DirectoryEntrySync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DirectoryEntrySync.h"
+#include "ExceptionCode.h"
+#include "V8Binding.h"
+#include "V8BindingMacros.h"
+#include "V8EntryCallback.h"
+#include "V8ErrorCallback.h"
+#include "V8FileEntrySync.h"
+#include "V8Flags.h"
+#include "V8Proxy.h"
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+static bool extractBooleanValue(const v8::Handle<v8::Object>& object, const char* name, ExceptionCode& ec) {
+    ec = 0;
+    v8::Local<v8::Value> value = object->Get(v8::String::New(name));
+    if (!value.IsEmpty() && !isUndefinedOrNull(value)) {
+        v8::TryCatch block;
+        bool nativeValue = value->BooleanValue();
+        if (block.HasCaught()) {
+            ec = TYPE_MISMATCH_ERR;
+            return false;
+        }
+        return nativeValue;
+    }
+    return false;
+}
+
+static PassRefPtr<Flags> getFlags(const v8::Local<v8::Value>& arg, ExceptionCode& ec)
+{
+    ec = 0;
+    if (isUndefinedOrNull(arg) || !arg->IsObject())
+        return 0;
+    if (V8Flags::HasInstance(arg))
+        return V8Flags::toNative(v8::Handle<v8::Object>::Cast(arg));
+
+    v8::Handle<v8::Object> object;
+    {
+        v8::TryCatch block;
+        object = v8::Handle<v8::Object>::Cast(arg);
+        if (block.HasCaught()) {
+            ec = TYPE_MISMATCH_ERR;
+            return 0;
+        }
+    }
+
+    bool isCreate = extractBooleanValue(object, "create", ec);
+    if (ec)
+        return 0;
+    bool isExclusive = extractBooleanValue(object, "exclusive", ec);
+    if (ec)
+        return 0;
+
+    RefPtr<Flags> flags = Flags::create();
+    flags->setCreate(isCreate);
+    flags->setExclusive(isExclusive);
+
+    return flags;
+}
+
+v8::Handle<v8::Value> V8DirectoryEntrySync::getDirectoryCallback(const v8::Arguments& args)
+{
+    INC_STATS("DOM.DirectoryEntrySync.getDirectory");
+    DirectoryEntrySync* imp = V8DirectoryEntrySync::toNative(args.Holder());
+    ExceptionCode ec = 0;
+    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, path, args[0]);
+    RefPtr<Flags> flags = getFlags(args[1], ec);
+    if (UNLIKELY(ec)) {
+        V8Proxy::setDOMException(ec);
+        return v8::Handle<v8::Value>();
+    }
+    RefPtr<DirectoryEntrySync> result = imp->getDirectory(path, flags, ec);
+    if (UNLIKELY(ec)) {
+        V8Proxy::setDOMException(ec);
+        return v8::Handle<v8::Value>();
+    }
+    return toV8(result.release());
+}
+
+v8::Handle<v8::Value> V8DirectoryEntrySync::getFileCallback(const v8::Arguments& args)
+{
+    INC_STATS("DOM.DirectoryEntrySync.getFile");
+    DirectoryEntrySync* imp = V8DirectoryEntrySync::toNative(args.Holder());
+    ExceptionCode ec = 0;
+    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, path, args[0]);
+    RefPtr<Flags> flags = getFlags(args[1], ec);
+    if (UNLIKELY(ec)) {
+        V8Proxy::setDOMException(ec);
+        return v8::Handle<v8::Value>();
+    }
+    RefPtr<FileEntrySync> result = imp->getFile(path, flags, ec);
+    if (UNLIKELY(ec)) {
+        V8Proxy::setDOMException(ec);
+        return v8::Handle<v8::Value>();
+    }
+    return toV8(result.release());
+}
+
+
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp b/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp
new file mode 100644
index 0000000..e98df19
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EntrySync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "V8Attr.h"
+#include "V8Binding.h"
+#include "V8BindingState.h"
+#include "V8DirectoryEntrySync.h"
+#include "V8EntrySync.h"
+#include "V8FileEntrySync.h"
+#include "V8Proxy.h"
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+v8::Handle<v8::Value> toV8(EntrySync* impl)
+{
+    if (!impl)
+        return v8::Null();
+
+    if (impl->isFile())
+        return toV8(static_cast<FileEntrySync*>(impl));
+
+    ASSERT(impl->isDirectory());
+    return toV8(static_cast<DirectoryEntrySync*>(impl));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/DOMFileSystem.cpp b/WebCore/fileapi/DOMFileSystem.cpp
index b1b1cdc..1742842 100644
--- a/WebCore/fileapi/DOMFileSystem.cpp
+++ b/WebCore/fileapi/DOMFileSystem.cpp
@@ -54,13 +54,8 @@
 namespace WebCore {
 
 DOMFileSystem::DOMFileSystem(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
-    : ActiveDOMObject(context, this)
-    , m_name(name)
-    , m_asyncFileSystem(asyncFileSystem)
-{
-}
-
-DOMFileSystem::~DOMFileSystem()
+    : DOMFileSystemBase(name, asyncFileSystem)
+    , ActiveDOMObject(context, this)
 {
 }
 
diff --git a/WebCore/fileapi/DOMFileSystem.h b/WebCore/fileapi/DOMFileSystem.h
index 8498e75..908c16c 100644
--- a/WebCore/fileapi/DOMFileSystem.h
+++ b/WebCore/fileapi/DOMFileSystem.h
@@ -35,6 +35,7 @@
 
 #include "ActiveDOMObject.h"
 #include "AsyncFileSystem.h"
+#include "DOMFileSystemBase.h"
 #include "Flags.h"
 #include "PlatformString.h"
 #include "ScriptExecutionContext.h"
@@ -54,16 +55,13 @@ class FileWriterCallback;
 class MetadataCallback;
 class VoidCallback;
 
-class DOMFileSystem : public RefCounted<DOMFileSystem>, public ActiveDOMObject {
+class DOMFileSystem : public DOMFileSystemBase, public ActiveDOMObject {
 public:
     static PassRefPtr<DOMFileSystem> create(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
     {
         return adoptRef(new DOMFileSystem(context, name, asyncFileSystem));
     }
 
-    virtual ~DOMFileSystem();
-
-    const String& name() const { return m_name; }
     PassRefPtr<DirectoryEntry> root();
 
     // ActiveDOMObject methods.
@@ -96,8 +94,6 @@ public:
 private:
     DOMFileSystem(ScriptExecutionContext*, const String& name, PassOwnPtr<AsyncFileSystem>);
 
-    AsyncFileSystem* asyncFileSystem() const { return m_asyncFileSystem.get(); }
-
     // A helper template to schedule a callback task.
     // FIXME: move this to a more generic place.
     template <typename CB, typename CBArg>
@@ -118,9 +114,6 @@ private:
         RefPtr<CB> m_callback;
         RefPtr<CBArg> m_callbackArg;
     };
-
-    String m_name;
-    mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
 };
 
 template <typename CB, typename CBArg>
diff --git a/WebCore/fileapi/DOMFileSystemBase.cpp b/WebCore/fileapi/DOMFileSystemBase.cpp
new file mode 100644
index 0000000..b69882d
--- /dev/null
+++ b/WebCore/fileapi/DOMFileSystemBase.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DOMFileSystemBase.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DOMFilePath.h"
+#include <wtf/OwnPtr.h>
+
+namespace WebCore {
+
+DOMFileSystemBase::DOMFileSystemBase(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+    : m_name(name)
+    , m_asyncFileSystem(asyncFileSystem)
+{
+}
+
+DOMFileSystemBase::~DOMFileSystemBase()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/DOMFileSystemBase.h b/WebCore/fileapi/DOMFileSystemBase.h
new file mode 100644
index 0000000..e714d8d
--- /dev/null
+++ b/WebCore/fileapi/DOMFileSystemBase.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DOMFileSystemBase_h
+#define DOMFileSystemBase_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+// A common base class for DOMFileSystem and DOMFileSystemSync.
+class DOMFileSystemBase : public RefCounted<DOMFileSystemBase> {
+public:
+    static PassRefPtr<DOMFileSystemBase> create(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+    {
+        return adoptRef(new DOMFileSystemBase(name, asyncFileSystem));
+    }
+    virtual ~DOMFileSystemBase();
+
+    const String& name() const { return m_name; }
+    AsyncFileSystem* asyncFileSystem() const { return m_asyncFileSystem.get(); }
+
+protected:
+    DOMFileSystemBase(const String& name, PassOwnPtr<AsyncFileSystem>);
+    friend class DOMFileSystemSync;
+
+    String m_name;
+    mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // DOMFileSystemBase_h
diff --git a/WebCore/fileapi/DOMFileSystemSync.cpp b/WebCore/fileapi/DOMFileSystemSync.cpp
new file mode 100644
index 0000000..e200d22
--- /dev/null
+++ b/WebCore/fileapi/DOMFileSystemSync.cpp
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DOMFileSystemSync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DOMFilePath.h"
+#include "DirectoryEntrySync.h"
+
+namespace WebCore {
+
+DOMFileSystemSync::DOMFileSystemSync(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+    : DOMFileSystemBase(name, asyncFileSystem)
+{
+}
+
+DOMFileSystemSync::~DOMFileSystemSync()
+{
+}
+
+PassRefPtr<DirectoryEntrySync> DOMFileSystemSync::root()
+{
+    return DirectoryEntrySync::create(this, DOMFilePath::root);
+}
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/DOMFileSystemSync.h b/WebCore/fileapi/DOMFileSystemSync.h
new file mode 100644
index 0000000..6e64526
--- /dev/null
+++ b/WebCore/fileapi/DOMFileSystemSync.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DOMFileSystemSync_h
+#define DOMFileSystemSync_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DOMFileSystemBase.h"
+
+namespace WebCore {
+
+class DirectoryEntrySync;
+
+typedef int ExceptionCode;
+
+class DOMFileSystemSync : public DOMFileSystemBase {
+public:
+    static PassRefPtr<DOMFileSystemSync> create(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+    {
+        return adoptRef(new DOMFileSystemSync(name, asyncFileSystem));
+    }
+
+    virtual ~DOMFileSystemSync();
+
+    PassRefPtr<DirectoryEntrySync> root();
+
+private:
+    DOMFileSystemSync(const String& name, PassOwnPtr<AsyncFileSystem>);
+};
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // DOMFileSystemSync_h
diff --git a/WebCore/fileapi/DOMFileSystemSync.idl b/WebCore/fileapi/DOMFileSystemSync.idl
new file mode 100644
index 0000000..b51d8cc
--- /dev/null
+++ b/WebCore/fileapi/DOMFileSystemSync.idl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+    interface [
+        Conditional=FILE_SYSTEM,
+        NoStaticTables
+    ] DOMFileSystemSync {
+        readonly attribute DOMString name;
+        readonly attribute DirectoryEntrySync root;
+    };
+}
diff --git a/WebCore/fileapi/DirectoryEntry.cpp b/WebCore/fileapi/DirectoryEntry.cpp
index 95c12e4..f78787a 100644
--- a/WebCore/fileapi/DirectoryEntry.cpp
+++ b/WebCore/fileapi/DirectoryEntry.cpp
@@ -51,12 +51,12 @@ PassRefPtr<DirectoryReader> DirectoryEntry::createReader()
 
 void DirectoryEntry::getFile(const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
 {
-    m_fileSystem->getFile(this, path, flags, successCallback, errorCallback);
+    filesystem()->getFile(this, path, flags, successCallback, errorCallback);
 }
 
 void DirectoryEntry::getDirectory(const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
 {
-    m_fileSystem->getDirectory(this, path, flags, successCallback, errorCallback);
+    filesystem()->getDirectory(this, path, flags, successCallback, errorCallback);
 }
 
 } // namespace
diff --git a/WebCore/fileapi/DirectoryEntrySync.cpp b/WebCore/fileapi/DirectoryEntrySync.cpp
new file mode 100644
index 0000000..1ad2cf5
--- /dev/null
+++ b/WebCore/fileapi/DirectoryEntrySync.cpp
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DirectoryEntrySync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DirectoryReaderSync.h"
+#include "EntrySync.h"
+#include "FileEntrySync.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+DirectoryEntrySync::DirectoryEntrySync(DOMFileSystemBase* fileSystem, const String& fullPath)
+    : EntrySync(fileSystem, fullPath)
+{
+}
+
+PassRefPtr<DirectoryReaderSync> DirectoryEntrySync::createReader(ExceptionCode&)
+{
+    return DirectoryReaderSync::create(m_fileSystem, m_fullPath);
+}
+
+PassRefPtr<FileEntrySync> DirectoryEntrySync::getFile(const String&, PassRefPtr<Flags>, ExceptionCode&)
+{
+    // FIXME: to be implemented.
+    notImplemented();
+    return 0;
+}
+
+PassRefPtr<DirectoryEntrySync> DirectoryEntrySync::getDirectory(const String&, PassRefPtr<Flags>, ExceptionCode&)
+{
+    // FIXME: to be implemented.
+    notImplemented();
+    return 0;
+}
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/DirectoryEntrySync.h b/WebCore/fileapi/DirectoryEntrySync.h
new file mode 100644
index 0000000..1d7fb9f
--- /dev/null
+++ b/WebCore/fileapi/DirectoryEntrySync.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DirectoryEntrySync_h
+#define DirectoryEntrySync_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "EntrySync.h"
+#include "Flags.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DirectoryReaderSync;
+class FileEntrySync;
+
+class DirectoryEntrySync : public EntrySync {
+public:
+    static PassRefPtr<DirectoryEntrySync> create(DOMFileSystemBase* fileSystem, const String& fullPath)
+    {
+        return adoptRef(new DirectoryEntrySync(fileSystem, fullPath));
+    }
+    virtual bool isDirectory() const { return true; }
+
+    PassRefPtr<DirectoryReaderSync> createReader(ExceptionCode&);
+    PassRefPtr<FileEntrySync> getFile(const String& path, PassRefPtr<Flags>, ExceptionCode&);
+    PassRefPtr<DirectoryEntrySync> getDirectory(const String& path, PassRefPtr<Flags>, ExceptionCode&);
+
+private:
+    friend class EntrySync;
+    DirectoryEntrySync(DOMFileSystemBase*, const String& fullPath);
+};
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // DirectoryEntrySync_h
diff --git a/WebCore/fileapi/DirectoryEntrySync.idl b/WebCore/fileapi/DirectoryEntrySync.idl
new file mode 100644
index 0000000..cc796bf
--- /dev/null
+++ b/WebCore/fileapi/DirectoryEntrySync.idl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+    interface [
+        Conditional=FILE_SYSTEM,
+        GenerateNativeConverter,
+        GenerateToJS,
+        NoStaticTables
+    ] DirectoryEntrySync : EntrySync {
+        DirectoryReaderSync createReader() raises (FileException);
+        [Custom] FileEntrySync getFile(in [ConvertUndefinedOrNullToNullString] DOMString path, in Flags flags) raises (FileException);
+        [Custom] DirectoryEntrySync getDirectory(in [ConvertUndefinedOrNullToNullString] DOMString path, in Flags flags) raises (FileException);
+    };
+}
diff --git a/WebCore/fileapi/DirectoryReader.cpp b/WebCore/fileapi/DirectoryReader.cpp
index 092f976..3437675 100644
--- a/WebCore/fileapi/DirectoryReader.cpp
+++ b/WebCore/fileapi/DirectoryReader.cpp
@@ -33,29 +33,27 @@
 
 #if ENABLE(FILE_SYSTEM)
 
-#include "DOMFileSystem.h"
 #include "EntriesCallback.h"
 #include "EntryArray.h"
 #include "ErrorCallback.h"
+#include "FileError.h"
 
 namespace WebCore {
 
-DirectoryReader::DirectoryReader(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
-    : m_fileSystem(fileSystem)
-    , m_fullPath(fullPath)
-    , m_hasMore(true)
+DirectoryReader::DirectoryReader(DOMFileSystemBase* fileSystem, const String& fullPath)
+    : DirectoryReaderBase(fileSystem, fullPath)
 {
 }
 
 void DirectoryReader::readEntries(PassRefPtr<EntriesCallback> entriesCallback, PassRefPtr<ErrorCallback> errorCallback)
 {
-    if (!m_hasMore) {
-        m_fileSystem->scheduleCallback(entriesCallback, EntryArray::create());
+    if (!m_hasMoreEntries) {
+        filesystem()->scheduleCallback(entriesCallback, EntryArray::create());
         return;
     }
-    m_fileSystem->readDirectory(this, m_fullPath, entriesCallback, errorCallback);
+    filesystem()->readDirectory(this, m_fullPath, entriesCallback, errorCallback);
 }
 
-} // namespace
+}
 
 #endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/DirectoryReader.h b/WebCore/fileapi/DirectoryReader.h
index 3358853..806fdf1 100644
--- a/WebCore/fileapi/DirectoryReader.h
+++ b/WebCore/fileapi/DirectoryReader.h
@@ -34,6 +34,7 @@
 #if ENABLE(FILE_SYSTEM)
 
 #include "DOMFileSystem.h"
+#include "DirectoryReaderBase.h"
 #include "PlatformString.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
@@ -44,26 +45,22 @@ class EntriesCallback;
 class EntriesCallbacks;
 class ErrorCallback;
 
-class DirectoryReader : public RefCounted<DirectoryReader> {
+class DirectoryReader : public DirectoryReaderBase {
 public:
-    static PassRefPtr<DirectoryReader> create(PassRefPtr<DOMFileSystem> fileSystem, const String& path)
+    static PassRefPtr<DirectoryReader> create(DOMFileSystemBase* fileSystem, const String& fullPath)
     {
-        return adoptRef(new DirectoryReader(fileSystem, path));
+        return adoptRef(new DirectoryReader(fileSystem, fullPath));
     }
 
-    DOMFileSystem* filesystem() const { return m_fileSystem.get(); }
     void readEntries(PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback> = 0);
-    void setHasMore(bool hasMore) { m_hasMore = hasMore; }
 
-private:
-    DirectoryReader(PassRefPtr<DOMFileSystem> fileSystem, const String& path);
+    DOMFileSystem* filesystem() const { return static_cast<DOMFileSystem*>(m_fileSystem); }
 
-    RefPtr<DOMFileSystem> m_fileSystem;
-    String m_fullPath;
-    bool m_hasMore;
+private:
+    DirectoryReader(DOMFileSystemBase*, const String& fullPath);
 };
 
-} // namespace
+}
 
 #endif // ENABLE(FILE_SYSTEM)
 
diff --git a/WebCore/fileapi/DirectoryReaderBase.h b/WebCore/fileapi/DirectoryReaderBase.h
new file mode 100644
index 0000000..7f73c6b
--- /dev/null
+++ b/WebCore/fileapi/DirectoryReaderBase.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DirectoryReaderBase_h
+#define DirectoryReaderBase_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DOMFileSystemBase.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DirectoryReaderBase : public RefCounted<DirectoryReaderBase> {
+public:
+    DOMFileSystemBase* filesystem() const { return m_fileSystem; }
+    void setHasMoreEntries(bool hasMoreEntries) { m_hasMoreEntries = hasMoreEntries; }
+
+protected:
+    DirectoryReaderBase(DOMFileSystemBase* fileSystem, const String& fullPath)
+        : m_fileSystem(fileSystem)
+        , m_fullPath(fullPath)
+        , m_hasMoreEntries(true)
+    {
+    }
+
+    DOMFileSystemBase* m_fileSystem;
+    String m_fullPath;
+    bool m_hasMoreEntries;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // DirectoryReaderBase_h
diff --git a/WebCore/fileapi/DirectoryReaderSync.cpp b/WebCore/fileapi/DirectoryReaderSync.cpp
new file mode 100644
index 0000000..600ab7f
--- /dev/null
+++ b/WebCore/fileapi/DirectoryReaderSync.cpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DirectoryReaderSync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "EntryArraySync.h"
+#include "ExceptionCode.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+DirectoryReaderSync::DirectoryReaderSync(DOMFileSystemBase* fileSystem, const String& fullPath)
+    : DirectoryReaderBase(fileSystem, fullPath)
+{
+}
+
+PassRefPtr<EntryArraySync> DirectoryReaderSync::readEntries(ExceptionCode&)
+{
+    notImplemented();
+    return 0;
+}
+
+} // namespace
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/DirectoryReaderSync.h b/WebCore/fileapi/DirectoryReaderSync.h
new file mode 100644
index 0000000..39119b7
--- /dev/null
+++ b/WebCore/fileapi/DirectoryReaderSync.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DirectoryReaderSync_h
+#define DirectoryReaderSync_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DirectoryReaderBase.h"
+#include "EntryArraySync.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DirectoryReaderSync : public DirectoryReaderBase {
+public:
+    static PassRefPtr<DirectoryReaderSync> create(DOMFileSystemBase* fileSystem, const String& fullPath)
+    {
+        return adoptRef(new DirectoryReaderSync(fileSystem, fullPath));
+    }
+
+    PassRefPtr<EntryArraySync> readEntries(ExceptionCode&);
+
+private:
+    DirectoryReaderSync(DOMFileSystemBase*, const String& fullPath);
+};
+
+} // namespace
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // DirectoryReaderSync_h
diff --git a/WebCore/fileapi/DirectoryReaderSync.idl b/WebCore/fileapi/DirectoryReaderSync.idl
new file mode 100644
index 0000000..aa39928
--- /dev/null
+++ b/WebCore/fileapi/DirectoryReaderSync.idl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+    interface [
+        Conditional=FILE_SYSTEM,
+        NoStaticTables
+    ] DirectoryReaderSync {
+        EntryArraySync readEntries() raises (FileException);
+    };
+}
diff --git a/WebCore/fileapi/Entry.cpp b/WebCore/fileapi/Entry.cpp
index 969ae2b..97a3270 100644
--- a/WebCore/fileapi/Entry.cpp
+++ b/WebCore/fileapi/Entry.cpp
@@ -43,35 +43,33 @@
 namespace WebCore {
 
 Entry::Entry(DOMFileSystem* fileSystem, const String& fullPath)
-    : m_fileSystem(fileSystem)
-    , m_fullPath(fullPath)
-    , m_name(DOMFilePath::getName(fullPath))
+    : EntryBase(fileSystem, fullPath)
 {
 }
 
 void Entry::getMetadata(PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
 {
-    m_fileSystem->getMetadata(this, successCallback, errorCallback);
+    filesystem()->getMetadata(this, successCallback, errorCallback);
 }
 
 void Entry::moveTo(PassRefPtr<Entry> parent, const String& name, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
 {
-    m_fileSystem->move(this, parent, name, successCallback, errorCallback);
+    filesystem()->move(this, parent, name, successCallback, errorCallback);
 }
 
 void Entry::copyTo(PassRefPtr<Entry> parent, const String& name, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
 {
-    m_fileSystem->copy(this, parent, name, successCallback, errorCallback);
+    filesystem()->copy(this, parent, name, successCallback, errorCallback);
 }
 
 void Entry::remove(PassRefPtr<VoidCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
 {
-    m_fileSystem->remove(this, successCallback, errorCallback);
+    filesystem()->remove(this, successCallback, errorCallback);
 }
 
 void Entry::getParent(PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
 {
-    m_fileSystem->getParent(this, successCallback, errorCallback);
+    filesystem()->getParent(this, successCallback, errorCallback);
 }
 
 String Entry::toURI(const String&)
diff --git a/WebCore/fileapi/Entry.h b/WebCore/fileapi/Entry.h
index 9af532f..b75f1ed 100644
--- a/WebCore/fileapi/Entry.h
+++ b/WebCore/fileapi/Entry.h
@@ -34,6 +34,7 @@
 #if ENABLE(FILE_SYSTEM)
 
 #include "DOMFileSystem.h"
+#include "EntryBase.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
@@ -44,17 +45,11 @@ class ErrorCallback;
 class MetadataCallback;
 class VoidCallback;
 
-class Entry : public RefCounted<Entry> {
+class Entry : public EntryBase {
 public:
     virtual ~Entry() { }
 
-    virtual bool isFile() const { return false; }
-    virtual bool isDirectory() const { return false; }
-
-    const String& fullPath() const { return m_fullPath; }
-    const String& name() const { return m_name; }
-
-    DOMFileSystem* filesystem() const { return m_fileSystem; }
+    DOMFileSystem* filesystem() const { return static_cast<DOMFileSystem*>(m_fileSystem); }
 
     virtual void getMetadata(PassRefPtr<MetadataCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0);
     virtual void moveTo(PassRefPtr<Entry> parent, const String& name = String(), PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
@@ -66,10 +61,6 @@ public:
 
 protected:
     Entry(DOMFileSystem* fileSystem, const String& fullPath);
-
-    DOMFileSystem* m_fileSystem;
-    String m_fullPath;
-    String m_name;
 };
 
 } // namespace WebCore
diff --git a/WebCore/fileapi/EntryArraySync.cpp b/WebCore/fileapi/EntryArraySync.cpp
new file mode 100644
index 0000000..99ec7d3
--- /dev/null
+++ b/WebCore/fileapi/EntryArraySync.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EntryArraySync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+namespace WebCore {
+
+EntryArraySync::EntryArraySync()
+{
+}
+
+EntrySync* EntryArraySync::item(unsigned index) const
+{
+    if (index >= m_entries.size())
+        return 0;
+    return m_entries[index].get();
+}
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/EntryArraySync.h b/WebCore/fileapi/EntryArraySync.h
new file mode 100644
index 0000000..6d0524d
--- /dev/null
+++ b/WebCore/fileapi/EntryArraySync.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EntryArraySync_h
+#define EntryArraySync_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "EntrySync.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class EntryArray;
+
+class EntryArraySync : public RefCounted<EntryArraySync> {
+public:
+    static PassRefPtr<EntryArraySync> create()
+    {
+        return adoptRef(new EntryArraySync());
+    }
+
+    unsigned length() const { return m_entries.size(); }
+    EntrySync* item(unsigned index) const;
+
+    bool isEmpty() const { return m_entries.isEmpty(); }
+    void clear() { m_entries.clear(); }
+    void append(PassRefPtr<EntrySync> entry) { m_entries.append(entry); }
+
+private:
+    EntryArraySync();
+
+    Vector<RefPtr<EntrySync> > m_entries;
+};
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // EntryArraySync_h
diff --git a/WebCore/fileapi/EntryArraySync.idl b/WebCore/fileapi/EntryArraySync.idl
new file mode 100644
index 0000000..bd54f33
--- /dev/null
+++ b/WebCore/fileapi/EntryArraySync.idl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+    interface [
+        Conditional=FILE_SYSTEM,
+        HasIndexGetter,
+        NoStaticTables
+    ] EntryArraySync {
+        readonly attribute unsigned long length;
+        EntrySync item(in [IsIndex] unsigned long index);
+    };
+}
diff --git a/WebCore/fileapi/EntryBase.h b/WebCore/fileapi/EntryBase.h
new file mode 100644
index 0000000..eee65df
--- /dev/null
+++ b/WebCore/fileapi/EntryBase.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EntryBase_h
+#define EntryBase_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DOMFilePath.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DOMFileSystemBase;
+class EntrySync;
+
+// A common base class for Entry and EntrySync.
+class EntryBase : public RefCounted<EntryBase> {
+public:
+    virtual ~EntryBase() { }
+
+    virtual bool isFile() const { return false; }
+    virtual bool isDirectory() const { return false; }
+
+    const String& fullPath() const { return m_fullPath; }
+    const String& name() const { return m_name; }
+
+protected:
+    EntryBase(DOMFileSystemBase* fileSystem, const String& fullPath)
+        : m_fileSystem(fileSystem)
+        , m_fullPath(fullPath)
+        , m_name(DOMFilePath::getName(fullPath))
+    {
+    }
+
+    friend class EntrySync;
+
+    DOMFileSystemBase* m_fileSystem;
+    String m_fullPath;
+    String m_name;
+};
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // EntryBase_h
diff --git a/WebCore/fileapi/EntrySync.cpp b/WebCore/fileapi/EntrySync.cpp
new file mode 100644
index 0000000..7da307c
--- /dev/null
+++ b/WebCore/fileapi/EntrySync.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EntrySync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DOMFilePath.h"
+#include "DirectoryEntrySync.h"
+#include "Metadata.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+PassRefPtr<Metadata> EntrySync::getMetadata(ExceptionCode&)
+{
+    // FIXME: to be implemented.
+    notImplemented();
+    return 0;
+}
+
+PassRefPtr<EntrySync> EntrySync::moveTo(PassRefPtr<DirectoryEntrySync>, const String&, ExceptionCode&) const
+{
+    // FIXME: to be implemented.
+    notImplemented();
+    return 0;
+}
+
+PassRefPtr<EntrySync> EntrySync::copyTo(PassRefPtr<DirectoryEntrySync>, const String&, ExceptionCode&) const
+{
+    // FIXME: to be implemented.
+    notImplemented();
+    return 0;
+}
+
+void EntrySync::remove(ExceptionCode&) const
+{
+    // FIXME: to be implemented.
+    notImplemented();
+}
+
+PassRefPtr<EntrySync> EntrySync::getParent() const
+{
+    // Sync verion of getParent doesn't throw exceptions.
+    String parentPath = DOMFilePath::getDirectory(fullPath());
+    return DirectoryEntrySync::create(m_fileSystem, parentPath);
+}
+
+EntrySync::EntrySync(DOMFileSystemBase* fileSystem, const String& fullPath)
+    : EntryBase(fileSystem, fullPath)
+{
+}
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/EntrySync.h b/WebCore/fileapi/EntrySync.h
new file mode 100644
index 0000000..10b1101
--- /dev/null
+++ b/WebCore/fileapi/EntrySync.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EntrySync_h
+#define EntrySync_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "DOMFileSystemSync.h"
+#include "EntryBase.h"
+#include "ExceptionCode.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DirectoryEntrySync;
+class Metadata;
+
+class EntrySync : public EntryBase {
+public:
+    DOMFileSystemSync* filesystem() const { return static_cast<DOMFileSystemSync*>(m_fileSystem); }
+
+    virtual PassRefPtr<Metadata> getMetadata(ExceptionCode&);
+    virtual PassRefPtr<EntrySync> moveTo(PassRefPtr<DirectoryEntrySync> parent, const String& name, ExceptionCode&) const;
+    virtual PassRefPtr<EntrySync> copyTo(PassRefPtr<DirectoryEntrySync> parent, const String& name, ExceptionCode&) const;
+    virtual void remove(ExceptionCode&) const;
+    virtual PassRefPtr<EntrySync> getParent() const;
+
+protected:
+    EntrySync(DOMFileSystemBase*, const String& fullPath);
+};
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // EntrySync_h
diff --git a/WebCore/fileapi/EntrySync.idl b/WebCore/fileapi/EntrySync.idl
new file mode 100644
index 0000000..fb7ee3c
--- /dev/null
+++ b/WebCore/fileapi/EntrySync.idl
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+    interface [
+        Conditional=FILE_SYSTEM,
+        CustomToJS,
+        NoStaticTables
+    ] EntrySync {
+        readonly attribute boolean isFile;
+        readonly attribute boolean isDirectory;
+        readonly attribute DOMString name;
+        readonly attribute DOMString fullPath;
+        readonly attribute DOMFileSystemSync filesystem;
+
+        Metadata getMetadata() raises (FileException);
+        EntrySync moveTo(in DirectoryEntrySync parent, in [ConvertUndefinedOrNullToNullString] DOMString name) raises (FileException);
+        EntrySync copyTo(in DirectoryEntrySync parent, in [ConvertUndefinedOrNullToNullString] DOMString name) raises (FileException);
+        void remove() raises (FileException);
+        DirectoryEntrySync getParent();
+    };
+}
diff --git a/WebCore/fileapi/FileEntry.cpp b/WebCore/fileapi/FileEntry.cpp
index b71a79f..a7e7158 100644
--- a/WebCore/fileapi/FileEntry.cpp
+++ b/WebCore/fileapi/FileEntry.cpp
@@ -48,12 +48,12 @@ FileEntry::FileEntry(DOMFileSystem* fileSystem, const String& fullPath)
 
 void FileEntry::createWriter(PassRefPtr<FileWriterCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
 {
-    m_fileSystem->createWriter(this, successCallback, errorCallback);
+    filesystem()->createWriter(this, successCallback, errorCallback);
 }
 
 void FileEntry::file(PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback>)
 {
-    m_fileSystem->scheduleCallback(successCallback, File::create(m_fullPath));
+    filesystem()->scheduleCallback(successCallback, File::create(m_fullPath));
 }
 
 } // namespace
diff --git a/WebCore/fileapi/FileEntrySync.cpp b/WebCore/fileapi/FileEntrySync.cpp
new file mode 100644
index 0000000..1d1760d
--- /dev/null
+++ b/WebCore/fileapi/FileEntrySync.cpp
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "FileEntrySync.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+namespace WebCore {
+
+FileEntrySync::FileEntrySync(DOMFileSystemBase* fileSystem, const String& fullPath)
+    : EntrySync(fileSystem, fullPath)
+{
+}
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/FileEntrySync.h b/WebCore/fileapi/FileEntrySync.h
new file mode 100644
index 0000000..c222afc
--- /dev/null
+++ b/WebCore/fileapi/FileEntrySync.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FileEntrySync_h
+#define FileEntrySync_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "EntrySync.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class FileEntrySync : public EntrySync {
+public:
+    static PassRefPtr<FileEntrySync> create(DOMFileSystemBase* fileSystem, const String& fullPath)
+    {
+        return adoptRef(new FileEntrySync(fileSystem, fullPath));
+    }
+
+    virtual bool isFile() const { return true; }
+
+private:
+    friend class EntrySync;
+    FileEntrySync(DOMFileSystemBase*, const String& fullPath);
+};
+
+}
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // FileEntrySync_h
diff --git a/WebCore/fileapi/FileEntrySync.idl b/WebCore/fileapi/FileEntrySync.idl
new file mode 100644
index 0000000..d88c897
--- /dev/null
+++ b/WebCore/fileapi/FileEntrySync.idl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+    interface [
+        Conditional=FILE_SYSTEM,
+        GenerateNativeConverter,
+        GenerateToJS,
+        NoStaticTables
+    ] FileEntrySync : EntrySync {
+    };
+}
diff --git a/WebCore/fileapi/FileSystemCallbacks.cpp b/WebCore/fileapi/FileSystemCallbacks.cpp
index 516f627..83b120b 100644
--- a/WebCore/fileapi/FileSystemCallbacks.cpp
+++ b/WebCore/fileapi/FileSystemCallbacks.cpp
@@ -163,7 +163,7 @@ void EntriesCallbacks::didReadDirectoryEntry(const String& name, bool isDirector
 
 void EntriesCallbacks::didReadDirectoryEntries(bool hasMore)
 {
-    m_directoryReader->setHasMore(hasMore);
+    m_directoryReader->setHasMoreEntries(hasMore);
     if (m_successCallback)
         m_successCallback->handleEvent(m_entries.get());
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list