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

Unified Diff: chrome/browser/renderer_host/database_dispatcher_host.h

Issue 1338001: Block database access on allowDatabase instead of databaseOpenFile. (Closed)
Patch Set: without worker support Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/database_dispatcher_host.h
diff --git a/chrome/browser/renderer_host/database_dispatcher_host.h b/chrome/browser/renderer_host/database_dispatcher_host.h
index 4c16d0625ad296024b164257af999b73768f319f..007c973757edd0f89404aad962a816fc1fc9f0ec 100644
--- a/chrome/browser/renderer_host/database_dispatcher_host.h
+++ b/chrome/browser/renderer_host/database_dispatcher_host.h
@@ -14,6 +14,9 @@
#include "webkit/database/database_connections.h"
#include "webkit/database/database_tracker.h"
+class GURL;
+class HostContentSettingsMap;
+class Receiver;
class ResourceMessageFilter;
class DatabaseDispatcherHost
@@ -48,6 +51,11 @@ class DatabaseDispatcherHost
const string16& database_name);
void OnDatabaseClosed(const string16& origin_identifier,
const string16& database_name);
+ void OnAllowDatabase(const std::string& origin,
+ const string16& name,
+ const string16& display_name,
+ unsigned long estimated_size,
+ IPC::Message* reply_msg);
// DatabaseTracker::Observer callbacks (file thread)
virtual void OnDatabaseSizeChanged(const string16& origin_identifier,
@@ -57,12 +65,15 @@ class DatabaseDispatcherHost
virtual void OnDatabaseScheduledForDeletion(const string16& origin_identifier,
const string16& database_name);
+ void Send(IPC::Message* message);
+
private:
+ class PromptDelegate;
+
void AddObserver();
void RemoveObserver();
void ReceivedBadMessage(uint32 msg_type);
- void SendMessage(IPC::Message* message);
// VFS message handlers (file thread)
void DatabaseOpenFile(const string16& vfs_file_name,
@@ -87,11 +98,9 @@ class DatabaseDispatcherHost
void DatabaseClosed(const string16& origin_identifier,
const string16& database_name);
- // Called once we decide whether to allow or block an open file request.
- void OnDatabaseOpenFileAllowed(const string16& vfs_file_name,
- int desired_flags,
- int32 message_id);
- void OnDatabaseOpenFileBlocked(int32 message_id);
+ // CookiePromptModalDialog response handler (io thread)
+ void AllowDatabaseResponse(IPC::Message* reply_msg,
+ ContentSetting content_setting);
// The database tracker for the current profile.
scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;

Powered by Google App Engine
This is Rietveld 408576698