summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 18:34:31 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 18:34:31 +0000
commit9bf103edf104b4e4174a3ba22da9af6816858033 (patch)
tree96292c4e3b173a941cbf386c88780e902059c797 /webkit
parent252cad6dec04039d456e716273153951d0090b5f (diff)
downloadchromium_src-9bf103edf104b4e4174a3ba22da9af6816858033.zip
chromium_src-9bf103edf104b4e4174a3ba22da9af6816858033.tar.gz
chromium_src-9bf103edf104b4e4174a3ba22da9af6816858033.tar.bz2
Rename WebFileSystem to WebFileUtilities for corresponding WebKit API changes.
This change depends on an upstream change (not yet rolled): http://trac.webkit.org/changeset/65482 BUG=52355 TESTS=existing tests (like ones under fast/files) should pass Review URL: http://codereview.chromium.org/3153015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webfileutilities_impl.cc (renamed from webkit/glue/webfilesystem_impl.cc)57
-rw-r--r--webkit/glue/webfileutilities_impl.h (renamed from webkit/glue/webfilesystem_impl.h)16
-rw-r--r--webkit/glue/webkit_glue.gypi4
-rw-r--r--webkit/support/test_webkit_client.cc6
-rw-r--r--webkit/support/test_webkit_client.h6
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h8
7 files changed, 50 insertions, 49 deletions
diff --git a/webkit/glue/webfilesystem_impl.cc b/webkit/glue/webfileutilities_impl.cc
index 585287b..a7ba5b5 100644
--- a/webkit/glue/webfilesystem_impl.cc
+++ b/webkit/glue/webfileutilities_impl.cc
@@ -2,7 +2,7 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-#include "webkit/glue/webfilesystem_impl.h"
+#include "webkit/glue/webfileutilities_impl.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -17,26 +17,27 @@ using WebKit::WebString;
namespace webkit_glue {
-WebFileSystemImpl::WebFileSystemImpl()
+WebFileUtilitiesImpl::WebFileUtilitiesImpl()
: sandbox_enabled_(true) {
}
-bool WebFileSystemImpl::fileExists(const WebString& path) {
+bool WebFileUtilitiesImpl::fileExists(const WebString& path) {
FilePath::StringType file_path = WebStringToFilePathString(path);
return file_util::PathExists(FilePath(file_path));
}
-bool WebFileSystemImpl::deleteFile(const WebString& path) {
+bool WebFileUtilitiesImpl::deleteFile(const WebString& path) {
NOTREACHED();
return false;
}
-bool WebFileSystemImpl::deleteEmptyDirectory(const WebString& path) {
+bool WebFileUtilitiesImpl::deleteEmptyDirectory(const WebString& path) {
NOTREACHED();
return false;
}
-bool WebFileSystemImpl::getFileSize(const WebString& path, long long& result) {
+bool WebFileUtilitiesImpl::getFileSize(const WebString& path,
+ long long& result) {
if (sandbox_enabled_) {
NOTREACHED();
return false;
@@ -45,8 +46,8 @@ bool WebFileSystemImpl::getFileSize(const WebString& path, long long& result) {
reinterpret_cast<int64*>(&result));
}
-bool WebFileSystemImpl::getFileModificationTime(const WebString& path,
- double& result) {
+bool WebFileUtilitiesImpl::getFileModificationTime(const WebString& path,
+ double& result) {
if (sandbox_enabled_) {
NOTREACHED();
return false;
@@ -58,12 +59,12 @@ bool WebFileSystemImpl::getFileModificationTime(const WebString& path,
return true;
}
-WebString WebFileSystemImpl::directoryName(const WebString& path) {
+WebString WebFileUtilitiesImpl::directoryName(const WebString& path) {
FilePath file_path(WebStringToFilePathString(path));
return FilePathToWebString(file_path.DirName());
}
-WebString WebFileSystemImpl::pathByAppendingComponent(
+WebString WebFileUtilitiesImpl::pathByAppendingComponent(
const WebString& webkit_path,
const WebString& webkit_component) {
FilePath path(WebStringToFilePathString(webkit_path));
@@ -72,29 +73,29 @@ WebString WebFileSystemImpl::pathByAppendingComponent(
return FilePathStringToWebString(combined_path.value());
}
-bool WebFileSystemImpl::makeAllDirectories(const WebString& path) {
+bool WebFileUtilitiesImpl::makeAllDirectories(const WebString& path) {
DCHECK(!sandbox_enabled_);
FilePath::StringType file_path = WebStringToFilePathString(path);
return file_util::CreateDirectory(FilePath(file_path));
}
-WebString WebFileSystemImpl::getAbsolutePath(const WebString& path) {
+WebString WebFileUtilitiesImpl::getAbsolutePath(const WebString& path) {
FilePath file_path(WebStringToFilePathString(path));
file_util::AbsolutePath(&file_path);
return FilePathStringToWebString(file_path.value());
}
-bool WebFileSystemImpl::isDirectory(const WebString& path) {
+bool WebFileUtilitiesImpl::isDirectory(const WebString& path) {
FilePath file_path(WebStringToFilePathString(path));
return file_util::DirectoryExists(file_path);
}
-WebKit::WebURL WebFileSystemImpl::filePathToURL(const WebString& path) {
+WebKit::WebURL WebFileUtilitiesImpl::filePathToURL(const WebString& path) {
return net::FilePathToFileURL(WebStringToFilePath(path));
}
-base::PlatformFile WebFileSystemImpl::openFile(const WebString& path,
- int mode) {
+base::PlatformFile WebFileUtilitiesImpl::openFile(const WebString& path,
+ int mode) {
if (sandbox_enabled_) {
NOTREACHED();
return base::kInvalidPlatformFileValue;
@@ -107,33 +108,33 @@ base::PlatformFile WebFileSystemImpl::openFile(const WebString& path,
NULL);
}
-void WebFileSystemImpl::closeFile(base::PlatformFile& handle) {
+void WebFileUtilitiesImpl::closeFile(base::PlatformFile& handle) {
if (handle == base::kInvalidPlatformFileValue)
return;
if (base::ClosePlatformFile(handle))
handle = base::kInvalidPlatformFileValue;
}
-long long WebFileSystemImpl::seekFile(base::PlatformFile handle,
- long long offset,
- int origin) {
+long long WebFileUtilitiesImpl::seekFile(base::PlatformFile handle,
+ long long offset,
+ int origin) {
if (handle == base::kInvalidPlatformFileValue)
return -1;
net::FileStream file_stream(handle, 0);
return file_stream.Seek(static_cast<net::Whence>(origin), offset);
}
-bool WebFileSystemImpl::truncateFile(base::PlatformFile handle,
- long long offset) {
+bool WebFileUtilitiesImpl::truncateFile(base::PlatformFile handle,
+ long long offset) {
if (handle == base::kInvalidPlatformFileValue || offset < 0)
return false;
net::FileStream file_stream(handle, base::PLATFORM_FILE_WRITE);
return file_stream.Truncate(offset) >= 0;
}
-int WebFileSystemImpl::readFromFile(base::PlatformFile handle,
- char* data,
- int length) {
+int WebFileUtilitiesImpl::readFromFile(base::PlatformFile handle,
+ char* data,
+ int length) {
if (handle == base::kInvalidPlatformFileValue || !data || length <= 0)
return -1;
std::string buffer;
@@ -142,9 +143,9 @@ int WebFileSystemImpl::readFromFile(base::PlatformFile handle,
return file_stream.Read(data, length, NULL);
}
-int WebFileSystemImpl::writeToFile(base::PlatformFile handle,
- const char* data,
- int length) {
+int WebFileUtilitiesImpl::writeToFile(base::PlatformFile handle,
+ const char* data,
+ int length) {
if (handle == base::kInvalidPlatformFileValue || !data || length <= 0)
return -1;
net::FileStream file_stream(handle, base::PLATFORM_FILE_WRITE);
diff --git a/webkit/glue/webfilesystem_impl.h b/webkit/glue/webfileutilities_impl.h
index 875a13b..f35293b 100644
--- a/webkit/glue/webfilesystem_impl.h
+++ b/webkit/glue/webfileutilities_impl.h
@@ -2,20 +2,20 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-#ifndef WEBFILESYSTEM_IMPL_H_
-#define WEBFILESYSTEM_IMPL_H_
+#ifndef WEBFILEUTILITIES_IMPL_H_
+#define WEBFILEUTILITIES_IMPL_H_
#include "base/platform_file.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebFileUtilities.h"
namespace webkit_glue {
-class WebFileSystemImpl : public WebKit::WebFileSystem {
+class WebFileUtilitiesImpl : public WebKit::WebFileUtilities {
public:
- WebFileSystemImpl();
- virtual ~WebFileSystemImpl() { }
+ WebFileUtilitiesImpl();
+ virtual ~WebFileUtilitiesImpl() { }
- // WebFileSystem methods:
+ // WebFileUtilities methods:
virtual bool fileExists(const WebKit::WebString& path);
virtual bool deleteFile(const WebKit::WebString& path);
virtual bool deleteEmptyDirectory(const WebKit::WebString& path);
@@ -51,4 +51,4 @@ class WebFileSystemImpl : public WebKit::WebFileSystem {
} // namespace webkit_glue
-#endif // WEBFILESYSTEM_IMPL_H_
+#endif // WEBFILEUTILITIES_IMPL_H_
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 02efafd..b17f5e7 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -316,8 +316,8 @@
'webdropdata.cc',
'webdropdata_win.cc',
'webdropdata.h',
- 'webfilesystem_impl.cc',
- 'webfilesystem_impl.h',
+ 'webfileutilities_impl.cc',
+ 'webfileutilities_impl.h',
'webkit_glue.cc',
'webkit_glue.h',
'webkitclient_impl.cc',
diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc
index a031f3f..64eef28 100644
--- a/webkit/support/test_webkit_client.cc
+++ b/webkit/support/test_webkit_client.cc
@@ -107,7 +107,7 @@ TestWebKitClient::TestWebKitClient(bool unit_test_mode)
WebKit::WebDatabase::setObserver(&database_system_);
- file_system_.set_sandbox_enabled(false);
+ file_utilities_.set_sandbox_enabled(false);
#if defined(OS_WIN)
// Ensure we pick up the default theme engine.
@@ -141,8 +141,8 @@ WebKit::WebClipboard* TestWebKitClient::clipboard() {
return &mock_clipboard_;
}
-WebKit::WebFileSystem* TestWebKitClient::fileSystem() {
- return &file_system_;
+WebKit::WebFileUtilities* TestWebKitClient::fileUtilities() {
+ return &file_utilities_;
}
WebKit::WebSandboxSupport* TestWebKitClient::sandboxSupport() {
diff --git a/webkit/support/test_webkit_client.h b/webkit/support/test_webkit_client.h
index 6a51ec4..24d2382 100644
--- a/webkit/support/test_webkit_client.h
+++ b/webkit/support/test_webkit_client.h
@@ -5,7 +5,7 @@
#ifndef WEBKIT_SUPPORT_TEST_WEBKIT_CLIENT_H_
#define WEBKIT_SUPPORT_TEST_WEBKIT_CLIENT_H_
-#include "webkit/glue/webfilesystem_impl.h"
+#include "webkit/glue/webfileutilities_impl.h"
#include "webkit/glue/webkitclient_impl.h"
#include "webkit/support/weburl_loader_mock_factory.h"
#include "webkit/tools/test_shell/mock_webclipboard_impl.h"
@@ -22,7 +22,7 @@ class TestWebKitClient : public webkit_glue::WebKitClientImpl {
virtual WebKit::WebMimeRegistry* mimeRegistry();
WebKit::WebClipboard* clipboard();
- virtual WebKit::WebFileSystem* fileSystem();
+ virtual WebKit::WebFileUtilities* fileUtilities();
virtual WebKit::WebSandboxSupport* sandboxSupport();
virtual WebKit::WebCookieJar* cookieJar();
virtual bool sandboxEnabled();
@@ -65,7 +65,7 @@ class TestWebKitClient : public webkit_glue::WebKitClientImpl {
private:
TestShellWebMimeRegistryImpl mime_registry_;
MockWebClipboardImpl mock_clipboard_;
- webkit_glue::WebFileSystemImpl file_system_;
+ webkit_glue::WebFileUtilitiesImpl file_utilities_;
ScopedTempDir appcache_dir_;
SimpleAppCacheSystem appcache_system_;
SimpleDatabaseSystem database_system_;
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc
index 538e54a..c0ac404 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.cc
+++ b/webkit/tools/test_shell/test_shell_webkit_init.cc
@@ -69,7 +69,7 @@ TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode) {
WebKit::WebDatabase::setObserver(&database_system_);
- file_system_.set_sandbox_enabled(false);
+ file_utilities_.set_sandbox_enabled(false);
#if defined(OS_WIN)
// Ensure we pick up the default theme engine.
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h
index 62fdc92..4fdd1ce 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.h
+++ b/webkit/tools/test_shell/test_shell_webkit_init.h
@@ -10,7 +10,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
#include "webkit/glue/webclipboard_impl.h"
-#include "webkit/glue/webfilesystem_impl.h"
+#include "webkit/glue/webfileutilities_impl.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h"
#include "webkit/tools/test_shell/mock_webclipboard_impl.h"
@@ -35,8 +35,8 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
WebKit::WebClipboard* clipboard();
- virtual WebKit::WebFileSystem* fileSystem() {
- return &file_system_;
+ virtual WebKit::WebFileUtilities* fileUtilities() {
+ return &file_utilities_;
}
virtual WebKit::WebSandboxSupport* sandboxSupport() {
@@ -136,7 +136,7 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
TestShellWebMimeRegistryImpl mime_registry_;
MockWebClipboardImpl mock_clipboard_;
webkit_glue::WebClipboardImpl real_clipboard_;
- webkit_glue::WebFileSystemImpl file_system_;
+ webkit_glue::WebFileUtilitiesImpl file_utilities_;
ScopedTempDir appcache_dir_;
SimpleAppCacheSystem appcache_system_;
SimpleDatabaseSystem database_system_;