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

Unified Diff: content/browser/in_process_webkit/dom_storage_message_filter.h

Issue 7480041: Adding session-only localStorage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Streamlining: Moving ResourceContext& from DOMStorageContext to DOMMessageFilter. Created 9 years, 4 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: content/browser/in_process_webkit/dom_storage_message_filter.h
diff --git a/content/browser/in_process_webkit/dom_storage_message_filter.h b/content/browser/in_process_webkit/dom_storage_message_filter.h
index 9ac90346930789272e8b90e6c1e42bc84d1bdbf0..28332a8c529e24ca6ed7c0389310e9fa94711576 100644
--- a/content/browser/in_process_webkit/dom_storage_message_filter.h
+++ b/content/browser/in_process_webkit/dom_storage_message_filter.h
@@ -10,6 +10,7 @@
#include "base/process.h"
#include "base/tracked.h"
#include "content/browser/browser_message_filter.h"
+#include "content/browser/content_browser_client.h"
#include "content/browser/in_process_webkit/dom_storage_area.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/common/dom_storage_common.h"
@@ -18,13 +19,23 @@ class DOMStorageContext;
class GURL;
struct DOMStorageMsg_Event_Params;
+namespace content {
+class ResourceContext;
+}
+
+namespace dom_storage_test_helpers {
+class SessionOnlyTestHelper;
+}
+
// This class handles the logistics of DOM Storage within the browser process.
// It mostly ferries information between IPCs and the WebKit implementations,
// but it also handles some special cases like when renderer processes die.
class DOMStorageMessageFilter : public BrowserMessageFilter {
public:
// Only call the constructor from the UI thread.
- DOMStorageMessageFilter(int process_id, WebKitContext* webkit_context);
+ DOMStorageMessageFilter(int process_id,
+ WebKitContext* webkit_context,
+ const content::ResourceContext& resource_context);
// BrowserMessageFilter implementation
virtual void OnChannelConnected(int32 peer_pid);
@@ -42,11 +53,12 @@ class DOMStorageMessageFilter : public BrowserMessageFilter {
private:
friend class BrowserThread;
friend class DeleteTask<DOMStorageMessageFilter>;
+ friend class dom_storage_test_helpers::SessionOnlyTestHelper;
virtual ~DOMStorageMessageFilter();
// Message Handlers.
void OnStorageAreaId(int64 namespace_id, const string16& origin,
- int64* storage_area_id);
+ IPC::Message* reply_msg);
void OnLength(int64 storage_area_id, unsigned* length);
void OnKey(int64 storage_area_id, unsigned index, NullableString16* key);
void OnGetItem(int64 storage_area_id, const string16& key,
@@ -67,6 +79,11 @@ class DOMStorageMessageFilter : public BrowserMessageFilter {
return webkit_context_->dom_storage_context();
}
+ void OnStorageAreaIdOnWebKitThread(int64 namespace_id,
+ const string16& origin,
+ bool allow_permanent_storage,
+ IPC::Message* reply_msg);
+
// Use whenever there's a chance OnStorageEvent will be called.
class ScopedStorageEventContext {
public:
@@ -82,6 +99,7 @@ class DOMStorageMessageFilter : public BrowserMessageFilter {
// Data shared between renderer processes with the same profile.
scoped_refptr<WebKitContext> webkit_context_;
+ const content::ResourceContext& resource_context_;
// Used to dispatch messages to the correct view host.
int process_id_;

Powered by Google App Engine
This is Rietveld 408576698