summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 01:30:08 +0000
committerericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 01:30:08 +0000
commit2b437e23748d7444f1698ae9242fabf0bc0730a7 (patch)
tree40a740c3f0a8032e30299d8724e54d9a269291af
parente0976a77dcc9be00485086b5b0e112fe6d159ff2 (diff)
downloadchromium_src-2b437e23748d7444f1698ae9242fabf0bc0730a7.zip
chromium_src-2b437e23748d7444f1698ae9242fabf0bc0730a7.tar.gz
chromium_src-2b437e23748d7444f1698ae9242fabf0bc0730a7.tar.bz2
Changes to the Browser to support Database access from Workers.
This changelist should have no visible effect until the V8 bindings for the Database get added to the Worker context in WebKit. BUG=none TEST=webkit layout tests Review URL: http://codereview.chromium.org/1387001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43427 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/database_dispatcher_host.cc28
-rw-r--r--chrome/browser/renderer_host/database_dispatcher_host.h14
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc9
-rw-r--r--chrome/browser/worker_host/worker_process_host.cc36
-rw-r--r--chrome/browser/worker_host/worker_process_host.h29
-rw-r--r--chrome/browser/worker_host/worker_service.cc35
-rw-r--r--chrome/browser/worker_host/worker_service.h15
-rw-r--r--chrome/chrome.gyp1
-rw-r--r--chrome/chrome_common.gypi4
-rwxr-xr-xchrome/chrome_renderer.gypi8
-rw-r--r--chrome/common/database_util.cc77
-rw-r--r--chrome/common/database_util.h23
-rw-r--r--chrome/common/web_database_observer_impl.cc (renamed from chrome/renderer/renderer_web_database_observer.cc)14
-rw-r--r--chrome/common/web_database_observer_impl.h (renamed from chrome/renderer/renderer_web_database_observer.h)10
-rw-r--r--chrome/renderer/render_thread.cc12
-rw-r--r--chrome/renderer/render_thread.h4
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.cc57
-rw-r--r--chrome/worker/worker_thread.cc17
-rw-r--r--chrome/worker/worker_thread.h6
-rw-r--r--chrome/worker/worker_webkitclient_impl.cc32
-rw-r--r--chrome/worker/worker_webkitclient_impl.h16
21 files changed, 326 insertions, 121 deletions
diff --git a/chrome/browser/renderer_host/database_dispatcher_host.cc b/chrome/browser/renderer_host/database_dispatcher_host.cc
index c4ad80d..f649dfb 100644
--- a/chrome/browser/renderer_host/database_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/database_dispatcher_host.cc
@@ -18,10 +18,10 @@
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
+#include "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/renderer_host/browser_render_process_host.h"
#include "chrome/browser/renderer_host/database_permission_request.h"
-#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/common/render_messages.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
@@ -38,14 +38,16 @@ const int kDelayDeleteRetryMs = 100;
DatabaseDispatcherHost::DatabaseDispatcherHost(
DatabaseTracker* db_tracker,
- ResourceMessageFilter* resource_message_filter)
+ IPC::Message::Sender* sender,
+ HostContentSettingsMap *host_content_settings_map)
: db_tracker_(db_tracker),
- resource_message_filter_(resource_message_filter),
+ message_sender_(sender),
process_handle_(0),
observer_added_(false),
- shutdown_(false) {
+ shutdown_(false),
+ host_content_settings_map_(host_content_settings_map) {
DCHECK(db_tracker_);
- DCHECK(resource_message_filter_);
+ DCHECK(message_sender_);
}
void DatabaseDispatcherHost::Init(base::ProcessHandle process_handle) {
@@ -58,7 +60,7 @@ void DatabaseDispatcherHost::Init(base::ProcessHandle process_handle) {
void DatabaseDispatcherHost::Shutdown() {
shutdown_ = true;
- resource_message_filter_ = NULL;
+ message_sender_ = NULL;
if (observer_added_) {
ChromeThread::PostTask(
ChromeThread::FILE, FROM_HERE,
@@ -119,8 +121,8 @@ void DatabaseDispatcherHost::Send(IPC::Message* message) {
return;
}
- if (!shutdown_ && resource_message_filter_)
- resource_message_filter_->Send(message);
+ if (!shutdown_ && message_sender_)
+ message_sender_->Send(message);
else
delete message;
}
@@ -356,11 +358,9 @@ void DatabaseDispatcherHost::OnAllowDatabase(const std::string& origin_url,
unsigned long estimated_size,
IPC::Message* reply_msg) {
GURL url = GURL(origin_url);
- HostContentSettingsMap* host_content_settings_map = resource_message_filter_->
- GetRequestContextForURL(url)->host_content_settings_map();
- ContentSetting content_setting = host_content_settings_map->GetContentSetting(
- url, CONTENT_SETTINGS_TYPE_COOKIES);
-
+ ContentSetting content_setting =
+ host_content_settings_map_->GetContentSetting(
+ url, CONTENT_SETTINGS_TYPE_COOKIES);
if (content_setting == CONTENT_SETTING_ASK) {
// Create a task for each possible outcome.
scoped_ptr<Task> on_allow(NewRunnableMethod(
@@ -373,7 +373,7 @@ void DatabaseDispatcherHost::OnAllowDatabase(const std::string& origin_url,
scoped_refptr<DatabasePermissionRequest> request(
new DatabasePermissionRequest(url, name, display_name, estimated_size,
on_allow.release(), on_block.release(),
- host_content_settings_map));
+ host_content_settings_map_));
request->RequestPermission();
// Tell the renderer that it needs to run a nested message loop.
diff --git a/chrome/browser/renderer_host/database_dispatcher_host.h b/chrome/browser/renderer_host/database_dispatcher_host.h
index 251bc5b..748e538 100644
--- a/chrome/browser/renderer_host/database_dispatcher_host.h
+++ b/chrome/browser/renderer_host/database_dispatcher_host.h
@@ -24,7 +24,8 @@ class DatabaseDispatcherHost
public webkit_database::DatabaseTracker::Observer {
public:
DatabaseDispatcherHost(webkit_database::DatabaseTracker* db_tracker,
- ResourceMessageFilter* resource_message_filter);
+ IPC::Message::Sender* sender,
+ HostContentSettingsMap *host_content_settings_map);
void Init(base::ProcessHandle process_handle);
void Shutdown();
@@ -65,6 +66,10 @@ class DatabaseDispatcherHost
virtual void OnDatabaseScheduledForDeletion(const string16& origin_identifier,
const string16& database_name);
+ webkit_database::DatabaseTracker* database_tracker() const {
+ return db_tracker_.get();
+ }
+
void Send(IPC::Message* message);
private:
@@ -105,8 +110,8 @@ class DatabaseDispatcherHost
// The database tracker for the current profile.
scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
- // The resource message filter that owns us.
- ResourceMessageFilter* resource_message_filter_;
+ // The sender to be used for sending out IPC messages.
+ IPC::Message::Sender* message_sender_;
// The handle of this process.
base::ProcessHandle process_handle_;
@@ -122,6 +127,9 @@ class DatabaseDispatcherHost
// Keeps track of all DB connections opened by this renderer
webkit_database::DatabaseConnections database_connections_;
+
+ // Used to look up permissions at database creation time.
+ scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
};
#endif // CHROME_BROWSER_RENDERER_HOST_DATABASE_DISPATCHER_HOST_H_
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index a095e3d..23733f8 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -302,12 +302,13 @@ ResourceMessageFilter::ResourceMessageFilter(
render_widget_helper_(render_widget_helper),
audio_renderer_host_(audio_renderer_host),
appcache_dispatcher_host_(
- new AppCacheDispatcherHost(profile->GetRequestContext())),
+ new AppCacheDispatcherHost(profile->GetRequestContext())),
ALLOW_THIS_IN_INITIALIZER_LIST(dom_storage_dispatcher_host_(
new DOMStorageDispatcherHost(this, profile->GetWebKitContext(),
resource_dispatcher_host->webkit_thread()))),
ALLOW_THIS_IN_INITIALIZER_LIST(db_dispatcher_host_(
- new DatabaseDispatcherHost(profile->GetDatabaseTracker(), this))),
+ new DatabaseDispatcherHost(profile->GetDatabaseTracker(), this,
+ profile->GetHostContentSettingsMap()))),
notification_prefs_(
profile->GetDesktopNotificationService()->prefs_cache()),
host_zoom_map_(profile->GetHostZoomMap()),
@@ -800,7 +801,9 @@ void ResourceMessageFilter::OnCreateWorker(
params.route_id : render_widget_helper_->GetNextRoutingID();
WorkerService::GetInstance()->CreateWorker(
params.url, params.is_shared, off_the_record(), params.name,
- params.document_id, id(), params.render_view_route_id, this, *route_id);
+ params.document_id, id(), params.render_view_route_id, this, *route_id,
+ db_dispatcher_host_->database_tracker(),
+ GetRequestContextForURL(params.url)->host_content_settings_map());
}
void ResourceMessageFilter::OnLookupSharedWorker(
diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc
index ba01a2d..38dd8e3 100644
--- a/chrome/browser/worker_host/worker_process_host.cc
+++ b/chrome/browser/worker_host/worker_process_host.cc
@@ -14,6 +14,7 @@
#include "base/string_util.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/child_process_security_policy.h"
+#include "chrome/browser/renderer_host/database_dispatcher_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
@@ -53,13 +54,21 @@ class WorkerCrashTask : public Task {
WorkerProcessHost::WorkerProcessHost(
- ResourceDispatcherHost* resource_dispatcher_host)
- : ChildProcessHost(WORKER_PROCESS, resource_dispatcher_host) {
+ ResourceDispatcherHost* resource_dispatcher_host,
+ webkit_database::DatabaseTracker *db_tracker,
+ HostContentSettingsMap *host_content_settings_map)
+ : ChildProcessHost(WORKER_PROCESS, resource_dispatcher_host),
+ host_content_settings_map_(host_content_settings_map) {
next_route_id_callback_.reset(NewCallbackWithReturnValue(
WorkerService::GetInstance(), &WorkerService::next_worker_route_id));
+ db_dispatcher_host_ =
+ new DatabaseDispatcherHost(db_tracker, this, host_content_settings_map);
}
WorkerProcessHost::~WorkerProcessHost() {
+ // Shut down the database dispatcher host.
+ db_dispatcher_host_->Shutdown();
+
// Let interested observers know we are being deleted.
NotificationService::current()->Notify(
NotificationType::WORKER_PROCESS_HOST_SHUTDOWN,
@@ -108,6 +117,11 @@ bool WorkerProcessHost::Init() {
}
if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableDatabases)) {
+ cmd_line->AppendSwitch(switches::kDisableDatabases);
+ }
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableLogging)) {
cmd_line->AppendSwitch(switches::kEnableLogging);
}
@@ -124,6 +138,7 @@ bool WorkerProcessHost::Init() {
switches::kDisableWebSockets)) {
cmd_line->AppendSwitch(switches::kDisableWebSockets);
}
+
#if defined(OS_WIN)
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableDesktopNotifications)) {
@@ -233,8 +248,9 @@ void WorkerProcessHost::OnWorkerContextClosed(int worker_route_id) {
void WorkerProcessHost::OnMessageReceived(const IPC::Message& message) {
bool msg_is_ok = true;
- bool handled = MessagePortDispatcher::GetInstance()->OnMessageReceived(
- message, this, next_route_id_callback_.get(), &msg_is_ok);
+ bool handled = db_dispatcher_host_->OnMessageReceived(message, &msg_is_ok) ||
+ MessagePortDispatcher::GetInstance()->OnMessageReceived(
+ message, this, next_route_id_callback_.get(), &msg_is_ok);
if (!handled) {
handled = true;
@@ -279,6 +295,10 @@ void WorkerProcessHost::OnMessageReceived(const IPC::Message& message) {
}
}
+void WorkerProcessHost::OnProcessLaunched() {
+ db_dispatcher_host_->Init(handle());
+}
+
CallbackWithReturnValue<int>::Type* WorkerProcessHost::GetNextRouteIdCallback(
IPC::Message::Sender* sender) {
// We don't keep callbacks for senders associated with workers, so figure out
@@ -435,7 +455,8 @@ void WorkerProcessHost::OnCreateWorker(
WorkerService::GetInstance()->CreateWorker(
params.url, params.is_shared, instances_.front().off_the_record(),
params.name, params.document_id, first_parent->renderer_id(),
- first_parent->render_view_route_id(), this, *route_id);
+ first_parent->render_view_route_id(), this, *route_id,
+ database_tracker(), host_content_settings_map_);
}
void WorkerProcessHost::OnCancelCreateDedicatedWorker(int route_id) {
@@ -466,6 +487,11 @@ void WorkerProcessHost::DocumentDetached(IPC::Message::Sender* parent,
}
}
+webkit_database::DatabaseTracker*
+ WorkerProcessHost::database_tracker() const {
+ return db_dispatcher_host_->database_tracker();
+}
+
WorkerProcessHost::WorkerInstance::WorkerInstance(const GURL& url,
bool shared,
bool off_the_record,
diff --git a/chrome/browser/worker_host/worker_process_host.h b/chrome/browser/worker_host/worker_process_host.h
index ea585dd..36d4312 100644
--- a/chrome/browser/worker_host/worker_process_host.h
+++ b/chrome/browser/worker_host/worker_process_host.h
@@ -9,13 +9,25 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/ref_counted.h"
#include "chrome/browser/child_process_host.h"
+#include "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/worker_host/worker_document_set.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel.h"
+class DatabaseDispatcherHost;
+namespace webkit_database {
+class DatabaseTracker;
+} // namespace webkit_database
+
struct ViewHostMsg_CreateWorker_Params;
+// The WorkerProcessHost is the interface that represents the browser side of
+// the browser <-> worker communication channel. There will be one
+// WorkerProcessHost per worker process. Currently each worker runs in its own
+// process, but that may change. However, we do assume [by storing a
+// HostContentSettingsMap] that a WorkerProcessHost serves a single Profile.
class WorkerProcessHost : public ChildProcessHost {
public:
@@ -82,7 +94,9 @@ class WorkerProcessHost : public ChildProcessHost {
scoped_refptr<WorkerDocumentSet> worker_document_set_;
};
- explicit WorkerProcessHost(ResourceDispatcherHost* resource_dispatcher_host);
+ WorkerProcessHost(ResourceDispatcherHost* resource_dispatcher_host,
+ webkit_database::DatabaseTracker *db_tracker,
+ HostContentSettingsMap *host_content_settings_map);
~WorkerProcessHost();
// Starts the process. Returns true iff it succeeded.
@@ -102,6 +116,12 @@ class WorkerProcessHost : public ChildProcessHost {
void DocumentDetached(IPC::Message::Sender* sender,
unsigned long long document_id);
+ webkit_database::DatabaseTracker* database_tracker() const;
+
+ HostContentSettingsMap *GetHostContentSettingsMap() const {
+ return host_content_settings_map_;
+ }
+
protected:
friend class WorkerService;
@@ -118,6 +138,9 @@ class WorkerProcessHost : public ChildProcessHost {
// Called when a message arrives from the worker process.
void OnMessageReceived(const IPC::Message& message);
+ // Called when the process has been launched successfully.
+ virtual void OnProcessLaunched();
+
// Called when the app invokes close() from within worker context.
void OnWorkerContextClosed(int worker_route_id);
@@ -150,6 +173,10 @@ class WorkerProcessHost : public ChildProcessHost {
Instances instances_;
+ scoped_refptr<DatabaseDispatcherHost> db_dispatcher_host_;
+
+ scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
+
// A callback to create a routing id for the associated worker process.
scoped_ptr<CallbackWithReturnValue<int>::Type> next_route_id_callback_;
diff --git a/chrome/browser/worker_host/worker_service.cc b/chrome/browser/worker_host/worker_service.cc
index f021e24..6946427 100644
--- a/chrome/browser/worker_host/worker_service.cc
+++ b/chrome/browser/worker_host/worker_service.cc
@@ -9,6 +9,7 @@
#include "base/sys_info.h"
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
@@ -45,15 +46,18 @@ void WorkerService::Initialize(ResourceDispatcherHost* rdh) {
WorkerService::~WorkerService() {
}
-bool WorkerService::CreateWorker(const GURL &url,
- bool is_shared,
- bool off_the_record,
- const string16& name,
- unsigned long long document_id,
- int renderer_id,
- int render_view_route_id,
- IPC::Message::Sender* sender,
- int sender_route_id) {
+bool WorkerService::CreateWorker(
+ const GURL &url,
+ bool is_shared,
+ bool off_the_record,
+ const string16& name,
+ unsigned long long document_id,
+ int renderer_id,
+ int render_view_route_id,
+ IPC::Message::Sender* sender,
+ int sender_route_id,
+ webkit_database::DatabaseTracker* db_tracker,
+ HostContentSettingsMap* host_content_settings_map) {
// Generate a unique route id for the browser-worker communication that's
// unique among all worker processes. That way when the worker process sends
// a wrapped IPC message through us, we know which WorkerProcessHost to give
@@ -67,11 +71,14 @@ bool WorkerService::CreateWorker(const GURL &url,
instance.worker_document_set()->Add(
sender, document_id, renderer_id, render_view_route_id);
- return CreateWorkerFromInstance(instance);
+ return CreateWorkerFromInstance(instance, db_tracker,
+ host_content_settings_map);
}
bool WorkerService::CreateWorkerFromInstance(
- WorkerProcessHost::WorkerInstance instance) {
+ WorkerProcessHost::WorkerInstance instance,
+ webkit_database::DatabaseTracker* db_tracker,
+ HostContentSettingsMap* host_content_settings_map) {
WorkerProcessHost* worker = NULL;
if (CommandLine::ForCurrentProcess()->HasSwitch(
@@ -152,7 +159,8 @@ bool WorkerService::CreateWorkerFromInstance(
}
if (!worker) {
- worker = new WorkerProcessHost(resource_dispatcher_host_);
+ worker = new WorkerProcessHost(resource_dispatcher_host_, db_tracker,
+ host_content_settings_map);
if (!worker->Init()) {
delete worker;
return false;
@@ -440,7 +448,8 @@ void WorkerService::WorkerProcessDestroyed(WorkerProcessHost* process) {
if (CanCreateWorkerProcess(*i)) {
WorkerProcessHost::WorkerInstance instance = *i;
queued_workers_.erase(i);
- CreateWorkerFromInstance(instance);
+ CreateWorkerFromInstance(instance, process->database_tracker(),
+ process->GetHostContentSettingsMap());
// CreateWorkerFromInstance can modify the queued_workers_ list when it
// coalesces queued instances after starting a shared worker, so we
diff --git a/chrome/browser/worker_host/worker_service.h b/chrome/browser/worker_host/worker_service.h
index 97891b5..c08d139 100644
--- a/chrome/browser/worker_host/worker_service.h
+++ b/chrome/browser/worker_host/worker_service.h
@@ -14,8 +14,10 @@
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"
-class WorkerProcessHost;
+class DatabaseTracker;
+class HostContentSettingsMap;
class ResourceDispatcherHost;
+class WorkerProcessHost;
class WorkerService : public NotificationObserver {
public:
@@ -25,7 +27,7 @@ class WorkerService : public NotificationObserver {
// Initialize the WorkerService. OK to be called multiple times.
void Initialize(ResourceDispatcherHost* rdh);
- // Creates a dedicated worker. Returns true on success.
+ // Creates a worker. Returns true on success.
bool CreateWorker(const GURL &url,
bool is_shared,
bool is_off_the_record,
@@ -34,7 +36,9 @@ class WorkerService : public NotificationObserver {
int renderer_pid,
int render_view_route_id,
IPC::Message::Sender* sender,
- int sender_route_id);
+ int sender_route_id,
+ webkit_database::DatabaseTracker* db_tracker,
+ HostContentSettingsMap* host_content_settings_map);
// Validates the passed URL and checks for the existence of matching shared
// worker. Returns true if the url was found, and sets the url_mismatch out
@@ -88,7 +92,10 @@ class WorkerService : public NotificationObserver {
~WorkerService();
// Given a WorkerInstance, create an associated worker process.
- bool CreateWorkerFromInstance(WorkerProcessHost::WorkerInstance instance);
+ bool CreateWorkerFromInstance(
+ WorkerProcessHost::WorkerInstance instance,
+ webkit_database::DatabaseTracker* db_tracker,
+ HostContentSettingsMap* host_content_settings_map);
// Returns a WorkerProcessHost object if one exists for the given domain, or
// NULL if there are no such workers yet.
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 3c2b6b9..2fb4b38 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -641,6 +641,7 @@
'msvs_guid': 'C78D02D0-A366-4EC6-A248-AA8E64C4BA18',
'dependencies': [
'../base/base.gyp:base',
+ '../skia/skia.gyp:skia',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
],
'sources': [
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index b9832d8..55b2a4c 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -196,6 +196,8 @@
'common/chrome_plugin_util.h',
'common/common_glue.cc',
'common/css_colors.h',
+ 'common/database_util.cc',
+ 'common/database_util.h',
'common/db_message_filter.cc',
'common/db_message_filter.h',
'common/dom_storage_common.h',
@@ -253,6 +255,8 @@
'common/view_types.h',
'common/visitedlink_common.cc',
'common/visitedlink_common.h',
+ 'common/web_database_observer_impl.cc',
+ 'common/web_database_observer_impl.h',
'common/webkit_param_traits.h',
'common/webmessageportchannel_impl.cc',
'common/webmessageportchannel_impl.h',
diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi
index 8b2bfc2..252baee 100755
--- a/chrome/chrome_renderer.gypi
+++ b/chrome/chrome_renderer.gypi
@@ -143,8 +143,6 @@
'renderer/renderer_webstoragearea_impl.h',
'renderer/renderer_webstoragenamespace_impl.cc',
'renderer/renderer_webstoragenamespace_impl.h',
- 'renderer/renderer_web_database_observer.cc',
- 'renderer/renderer_web_database_observer.h',
'renderer/spellchecker/spellcheck.cc',
'renderer/spellchecker/spellcheck.h',
'renderer/spellchecker/spellcheck_worditerator.cc',
@@ -196,9 +194,9 @@
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
- },
- ],
- ],
+ },
+ ],
+ ],
'dependencies': [
'../build/linux/system.gyp:gtk',
'../sandbox/sandbox.gyp:sandbox',
diff --git a/chrome/common/database_util.cc b/chrome/common/database_util.cc
new file mode 100644
index 0000000..7a54724
--- /dev/null
+++ b/chrome/common/database_util.cc
@@ -0,0 +1,77 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/database_util.h"
+
+#if defined(USE_SYSTEM_SQLITE)
+#include <sqlite3.h>
+#else
+#include "third_party/sqlite/preprocessed/sqlite3.h"
+#endif
+
+#include "chrome/common/db_message_filter.h"
+#include "chrome/common/render_messages.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
+
+using WebKit::WebKitClient;
+using WebKit::WebString;
+
+WebKitClient::FileHandle DatabaseUtil::databaseOpenFile(
+ const WebString& vfs_file_name, int desired_flags,
+ WebKitClient::FileHandle* dir_handle) {
+ DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
+ int message_id = db_message_filter->GetUniqueID();
+
+#if defined(OS_WIN)
+ ViewMsg_DatabaseOpenFileResponse_Params default_response =
+ { base::kInvalidPlatformFileValue };
+#elif defined(OS_POSIX)
+ ViewMsg_DatabaseOpenFileResponse_Params default_response =
+ { base::FileDescriptor(base::kInvalidPlatformFileValue, true),
+ base::FileDescriptor(base::kInvalidPlatformFileValue, true) };
+#endif
+
+ ViewMsg_DatabaseOpenFileResponse_Params result =
+ db_message_filter->SendAndWait(
+ new ViewHostMsg_DatabaseOpenFile(
+ vfs_file_name, desired_flags, message_id),
+ message_id, default_response);
+
+#if defined(OS_WIN)
+ if (dir_handle)
+ *dir_handle = base::kInvalidPlatformFileValue;
+ return result.file_handle;
+#elif defined(OS_POSIX)
+ if (dir_handle)
+ *dir_handle = result.dir_handle.fd;
+ return result.file_handle.fd;
+#endif
+}
+
+int DatabaseUtil::databaseDeleteFile(
+ const WebString& vfs_file_name, bool sync_dir) {
+ DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
+ int message_id = db_message_filter->GetUniqueID();
+ return db_message_filter->SendAndWait(
+ new ViewHostMsg_DatabaseDeleteFile(vfs_file_name, sync_dir, message_id),
+ message_id, SQLITE_IOERR_DELETE);
+}
+
+long DatabaseUtil::databaseGetFileAttributes(
+ const WebString& vfs_file_name) {
+ DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
+ int message_id = db_message_filter->GetUniqueID();
+ return db_message_filter->SendAndWait(
+ new ViewHostMsg_DatabaseGetFileAttributes(vfs_file_name, message_id),
+ message_id, -1L);
+}
+
+long long DatabaseUtil::databaseGetFileSize(
+ const WebString& vfs_file_name) {
+ DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
+ int message_id = db_message_filter->GetUniqueID();
+ return db_message_filter->SendAndWait(
+ new ViewHostMsg_DatabaseGetFileSize(vfs_file_name, message_id),
+ message_id, 0LL);
+}
diff --git a/chrome/common/database_util.h b/chrome/common/database_util.h
new file mode 100644
index 0000000..70bd029
--- /dev/null
+++ b/chrome/common/database_util.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_DATABASE_UTIL_H_
+#define CHROME_COMMON_DATABASE_UTIL_H_
+
+#include "webkit/glue/webkitclient_impl.h"
+
+// A class of utility functions used by RendererWebKitClientImpl and
+// WorkerWebKitClientImpl to handle database file accesses.
+class DatabaseUtil {
+ public:
+ static WebKit::WebKitClient::FileHandle databaseOpenFile(
+ const WebKit::WebString& vfs_file_name,
+ int desired_flags, WebKit::WebKitClient::FileHandle* dir_handle);
+ static int databaseDeleteFile(const WebKit::WebString& vfs_file_name,
+ bool sync_dir);
+ static long databaseGetFileAttributes(const WebKit::WebString& vfs_file_name);
+ static long long databaseGetFileSize(const WebKit::WebString& vfs_file_name);
+};
+
+#endif // CHROME_COMMON_DATABASE_UTIL_H_
diff --git a/chrome/renderer/renderer_web_database_observer.cc b/chrome/common/web_database_observer_impl.cc
index 2ded3cb..32d358c 100644
--- a/chrome/renderer/renderer_web_database_observer.cc
+++ b/chrome/common/web_database_observer_impl.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/renderer/renderer_web_database_observer.h"
+#include "chrome/common/web_database_observer_impl.h"
#include "base/auto_reset.h"
#include "base/message_loop.h"
@@ -10,13 +10,13 @@
#include "chrome/common/render_messages.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
-RendererWebDatabaseObserver::RendererWebDatabaseObserver(
+WebDatabaseObserverImpl::WebDatabaseObserverImpl(
IPC::Message::Sender* sender)
: sender_(sender),
waiting_for_dbs_to_close_(false) {
}
-void RendererWebDatabaseObserver::databaseOpened(
+void WebDatabaseObserverImpl::databaseOpened(
const WebKit::WebDatabase& database) {
string16 origin_identifier = database.securityOrigin().databaseIdentifier();
string16 database_name = database.name();
@@ -26,13 +26,13 @@ void RendererWebDatabaseObserver::databaseOpened(
database_connections_.AddConnection(origin_identifier, database_name);
}
-void RendererWebDatabaseObserver::databaseModified(
+void WebDatabaseObserverImpl::databaseModified(
const WebKit::WebDatabase& database) {
sender_->Send(new ViewHostMsg_DatabaseModified(
database.securityOrigin().databaseIdentifier(), database.name()));
}
-void RendererWebDatabaseObserver::databaseClosed(
+void WebDatabaseObserverImpl::databaseClosed(
const WebKit::WebDatabase& database) {
string16 origin_identifier = database.securityOrigin().databaseIdentifier();
string16 database_name = database.name();
@@ -43,7 +43,7 @@ void RendererWebDatabaseObserver::databaseClosed(
MessageLoop::current()->Quit();
}
-void RendererWebDatabaseObserver::WaitForAllDatabasesToClose() {
+void WebDatabaseObserverImpl::WaitForAllDatabasesToClose() {
if (!database_connections_.IsEmpty()) {
AutoReset waiting_for_dbs_auto_reset(&waiting_for_dbs_to_close_, true);
MessageLoop::ScopedNestableTaskAllower nestable(MessageLoop::current());
diff --git a/chrome/renderer/renderer_web_database_observer.h b/chrome/common/web_database_observer_impl.h
index 120b277..3f5e80b 100644
--- a/chrome/renderer/renderer_web_database_observer.h
+++ b/chrome/common/web_database_observer_impl.h
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_RENDERER_RENDERER_WEB_DATABASE_OBSERVER_H_
-#define CHROME_RENDERER_RENDERER_WEB_DATABASE_OBSERVER_H_
+#ifndef CHROME_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_
+#define CHROME_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_
#include "ipc/ipc_message.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabaseObserver.h"
#include "webkit/database/database_connections.h"
-class RendererWebDatabaseObserver : public WebKit::WebDatabaseObserver {
+class WebDatabaseObserverImpl : public WebKit::WebDatabaseObserver {
public:
- explicit RendererWebDatabaseObserver(IPC::Message::Sender* sender);
+ explicit WebDatabaseObserverImpl(IPC::Message::Sender* sender);
virtual void databaseOpened(const WebKit::WebDatabase& database);
virtual void databaseModified(const WebKit::WebDatabase& database);
virtual void databaseClosed(const WebKit::WebDatabase& database);
@@ -24,4 +24,4 @@ class RendererWebDatabaseObserver : public WebKit::WebDatabaseObserver {
webkit_database::DatabaseConnections database_connections_;
};
-#endif // CHROME_RENDERER_RENDERER_WEB_DATABASE_OBSERVER_H_
+#endif // CHROME_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 19c453e..494af01e 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -34,6 +34,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/renderer_preferences.h"
#include "chrome/common/url_constants.h"
+#include "chrome/common/web_database_observer_impl.h"
#include "chrome/plugin/npobject_util.h"
// TODO(port)
#if defined(OS_WIN)
@@ -58,7 +59,6 @@
#include "chrome/renderer/render_view.h"
#include "chrome/renderer/render_view_visitor.h"
#include "chrome/renderer/renderer_webkitclient_impl.h"
-#include "chrome/renderer/renderer_web_database_observer.h"
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/renderer/user_script_slave.h"
#include "ipc/ipc_message.h"
@@ -251,13 +251,13 @@ void RenderThread::Init() {
RenderThread::~RenderThread() {
// Wait for all databases to be closed.
- if (renderer_web_database_observer_.get())
- renderer_web_database_observer_->WaitForAllDatabasesToClose();
+ if (web_database_observer_impl_.get())
+ web_database_observer_impl_->WaitForAllDatabasesToClose();
// Shutdown in reverse of the initialization order.
- RemoveFilter(devtools_agent_filter_.get());
RemoveFilter(db_message_filter_.get());
db_message_filter_ = NULL;
+ RemoveFilter(devtools_agent_filter_.get());
if (webkit_client_.get())
WebKit::shutdown();
@@ -825,8 +825,8 @@ void RenderThread::EnsureWebKitInitialized() {
WebScriptController::registerExtension(
ExtensionApiTestV8Extension::Get(), EXTENSION_GROUP_CONTENT_SCRIPTS);
- renderer_web_database_observer_.reset(new RendererWebDatabaseObserver(this));
- WebKit::WebDatabase::setObserver(renderer_web_database_observer_.get());
+ web_database_observer_impl_.reset(new WebDatabaseObserverImpl(this));
+ WebKit::WebDatabase::setObserver(web_database_observer_impl_.get());
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h
index b774672..af0eefe 100644
--- a/chrome/renderer/render_thread.h
+++ b/chrome/renderer/render_thread.h
@@ -34,12 +34,12 @@ class ListValue;
class NullableString16;
class RenderDnsMaster;
class RendererHistogram;
-class RendererWebDatabaseObserver;
class RendererWebKitClientImpl;
class SpellCheck;
class SkBitmap;
class UserScriptSlave;
class URLPattern;
+class WebDatabaseObserverImpl;
struct ContentSettings;
struct RendererPreferences;
@@ -263,7 +263,7 @@ class RenderThread : public RenderThreadBase,
scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
scoped_ptr<RendererWebKitClientImpl> webkit_client_;
scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_;
- scoped_ptr<RendererWebDatabaseObserver> renderer_web_database_observer_;
+ scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
scoped_ptr<SpellCheck> spellchecker_;
// Used on the renderer and IPC threads.
diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc
index 33698c5..bbe6786 100644
--- a/chrome/renderer/renderer_webkitclient_impl.cc
+++ b/chrome/renderer/renderer_webkitclient_impl.cc
@@ -15,6 +15,7 @@
#include "base/platform_file.h"
#include "chrome/common/appcache/appcache_dispatcher.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/database_util.h"
#include "chrome/common/db_message_filter.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/webmessageportchannel_impl.h"
@@ -272,63 +273,25 @@ void RendererWebKitClientImpl::SandboxSupport::getRenderStyleForStrike(
//------------------------------------------------------------------------------
WebKitClient::FileHandle RendererWebKitClientImpl::databaseOpenFile(
- const WebString& vfs_file_name, int desired_flags,
+ const WebString& vfs_file_name, int desired_flags,
WebKitClient::FileHandle* dir_handle) {
- DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
- int message_id = db_message_filter->GetUniqueID();
-
- ViewMsg_DatabaseOpenFileResponse_Params default_response =
-#if defined(OS_WIN)
- { base::kInvalidPlatformFileValue };
-#elif defined(OS_POSIX)
- { base::FileDescriptor(base::kInvalidPlatformFileValue, true),
- base::FileDescriptor(base::kInvalidPlatformFileValue, true) };
-#endif
-
- ViewMsg_DatabaseOpenFileResponse_Params result =
- db_message_filter->SendAndWait(
- new ViewHostMsg_DatabaseOpenFile(
- vfs_file_name, desired_flags, message_id),
- message_id, default_response);
-
-#if defined(OS_WIN)
- if (dir_handle) {
- *dir_handle = base::kInvalidPlatformFileValue;
- }
- return result.file_handle;
-#elif defined(OS_POSIX)
- if (dir_handle) {
- *dir_handle = result.dir_handle.fd;
- }
- return result.file_handle.fd;
-#endif
+ return DatabaseUtil::databaseOpenFile(vfs_file_name, desired_flags,
+ dir_handle);
}
int RendererWebKitClientImpl::databaseDeleteFile(
- const WebString& vfs_file_name, bool sync_dir) {
- DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
- int message_id = db_message_filter->GetUniqueID();
- return db_message_filter->SendAndWait(
- new ViewHostMsg_DatabaseDeleteFile(vfs_file_name, sync_dir, message_id),
- message_id, SQLITE_IOERR_DELETE);
+ const WebString& vfs_file_name, bool sync_dir) {
+ return DatabaseUtil::databaseDeleteFile(vfs_file_name, sync_dir);
}
long RendererWebKitClientImpl::databaseGetFileAttributes(
- const WebString& vfs_file_name) {
- DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
- int message_id = db_message_filter->GetUniqueID();
- return db_message_filter->SendAndWait(
- new ViewHostMsg_DatabaseGetFileAttributes(vfs_file_name, message_id),
- message_id, -1L);
+ const WebString& vfs_file_name) {
+ return DatabaseUtil::databaseGetFileAttributes(vfs_file_name);
}
long long RendererWebKitClientImpl::databaseGetFileSize(
- const WebString& vfs_file_name) {
- DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance();
- int message_id = db_message_filter->GetUniqueID();
- return db_message_filter->SendAndWait(
- new ViewHostMsg_DatabaseGetFileSize(vfs_file_name, message_id),
- message_id, 0LL);
+ const WebString& vfs_file_name) {
+ return DatabaseUtil::databaseGetFileSize(vfs_file_name);
}
WebKit::WebSharedWorkerRepository*
diff --git a/chrome/worker/worker_thread.cc b/chrome/worker/worker_thread.cc
index 0591902..8f32a6a 100644
--- a/chrome/worker/worker_thread.cc
+++ b/chrome/worker/worker_thread.cc
@@ -8,10 +8,13 @@
#include "base/lazy_instance.h"
#include "base/thread_local.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/db_message_filter.h"
+#include "chrome/common/web_database_observer_impl.h"
#include "chrome/common/worker_messages.h"
#include "chrome/worker/webworker_stub.h"
#include "chrome/worker/websharedworker_stub.h"
#include "chrome/worker/worker_webkitclient_impl.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h"
@@ -25,19 +28,33 @@ WorkerThread::WorkerThread() {
lazy_tls.Pointer()->Set(this);
webkit_client_.reset(new WorkerWebKitClientImpl);
WebKit::initialize(webkit_client_.get());
+
+ web_database_observer_impl_.reset(new WebDatabaseObserverImpl(this));
+ WebKit::WebDatabase::setObserver(web_database_observer_impl_.get());
+
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ WebKit::WebRuntimeFeatures::enableDatabase(
+ !command_line.HasSwitch(switches::kDisableDatabases));
+
+ db_message_filter_ = new DBMessageFilter();
+ channel()->AddFilter(db_message_filter_.get());
+
#if defined(OS_WIN)
// We don't yet support notifications on non-Windows, so hide it from pages.
WebRuntimeFeatures::enableNotifications(
!command_line.HasSwitch(switches::kDisableDesktopNotifications));
#endif
+
WebRuntimeFeatures::enableSockets(
!command_line.HasSwitch(switches::kDisableWebSockets));
}
WorkerThread::~WorkerThread() {
// Shutdown in reverse of the initialization order.
+ channel()->RemoveFilter(db_message_filter_.get());
+ db_message_filter_ = NULL;
+
WebKit::shutdown();
lazy_tls.Pointer()->Set(NULL);
}
diff --git a/chrome/worker/worker_thread.h b/chrome/worker/worker_thread.h
index 0a0feae..727316c 100644
--- a/chrome/worker/worker_thread.h
+++ b/chrome/worker/worker_thread.h
@@ -10,6 +10,8 @@
#include "chrome/common/child_thread.h"
class GURL;
+class DBMessageFilter;
+class WebDatabaseObserverImpl;
class WebWorkerStubBase;
class WorkerWebKitClientImpl;
@@ -26,6 +28,8 @@ class WorkerThread : public ChildThread {
void RemoveWorkerStub(WebWorkerStubBase* stub);
private:
+ scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
+
virtual void OnControlMessageReceived(const IPC::Message& msg);
virtual void OnChannelError();
@@ -34,6 +38,8 @@ class WorkerThread : public ChildThread {
scoped_ptr<WorkerWebKitClientImpl> webkit_client_;
+ scoped_refptr<DBMessageFilter> db_message_filter_;
+
typedef std::set<WebWorkerStubBase*> WorkerStubsList;
WorkerStubsList worker_stubs_;
diff --git a/chrome/worker/worker_webkitclient_impl.cc b/chrome/worker/worker_webkitclient_impl.cc
index 4762ba7..8f3249f 100644
--- a/chrome/worker/worker_webkitclient_impl.cc
+++ b/chrome/worker/worker_webkitclient_impl.cc
@@ -1,16 +1,20 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "chrome/worker/worker_webkitclient_impl.h"
#include "base/logging.h"
+#include "chrome/common/database_util.h"
+#include "chrome/common/db_message_filter.h"
+#include "chrome/common/render_messages.h"
#include "chrome/common/webmessageportchannel_impl.h"
#include "chrome/worker/worker_thread.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
using WebKit::WebClipboard;
+using WebKit::WebKitClient;
using WebKit::WebMessagePortChannel;
using WebKit::WebMimeRegistry;
using WebKit::WebSandboxSupport;
@@ -100,6 +104,28 @@ WebSharedWorkerRepository* WorkerWebKitClientImpl::sharedWorkerRepository() {
return 0;
}
+WebKitClient::FileHandle WorkerWebKitClientImpl::databaseOpenFile(
+ const WebString& vfs_file_name, int desired_flags,
+ WebKitClient::FileHandle* dir_handle) {
+ return DatabaseUtil::databaseOpenFile(vfs_file_name, desired_flags,
+ dir_handle);
+}
+
+int WorkerWebKitClientImpl::databaseDeleteFile(
+ const WebString& vfs_file_name, bool sync_dir) {
+ return DatabaseUtil::databaseDeleteFile(vfs_file_name, sync_dir);
+}
+
+long WorkerWebKitClientImpl::databaseGetFileAttributes(
+ const WebString& vfs_file_name) {
+ return DatabaseUtil::databaseGetFileAttributes(vfs_file_name);
+}
+
+long long WorkerWebKitClientImpl::databaseGetFileSize(
+ const WebString& vfs_file_name) {
+ return DatabaseUtil::databaseGetFileSize(vfs_file_name);
+}
+
WebMimeRegistry::SupportsType WorkerWebKitClientImpl::supportsMIMEType(
const WebString&) {
return WebMimeRegistry::IsSupported;
diff --git a/chrome/worker/worker_webkitclient_impl.h b/chrome/worker/worker_webkitclient_impl.h
index 92299d3..a48eef3 100644
--- a/chrome/worker/worker_webkitclient_impl.h
+++ b/chrome/worker/worker_webkitclient_impl.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#ifndef CHROME_WORKER_WORKER_WEBKITCLIENT_IMPL_H_
#define CHROME_WORKER_WORKER_WEBKITCLIENT_IMPL_H_
@@ -37,6 +37,16 @@ class WorkerWebKitClientImpl : public webkit_glue::WebKitClientImpl,
const WebKit::WebURL& url, bool is_local_storage);
virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository();
+ virtual WebKit::WebKitClient::FileHandle databaseOpenFile(
+ const WebKit::WebString& vfs_file_name, int desired_flags,
+ WebKit::WebKitClient::FileHandle* dir_handle);
+ virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name,
+ bool sync_dir);
+ virtual long databaseGetFileAttributes(
+ const WebKit::WebString& vfs_file_name);
+ virtual long long databaseGetFileSize(
+ const WebKit::WebString& vfs_file_name);
+
// WebMimeRegistry methods:
virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType(
const WebKit::WebString&);