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

Unified Diff: content/browser/dom_storage/dom_storage_message_filter.cc

Issue 757723002: [Tests not passing yet] Remove prerender sessionStorage namespace merging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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/dom_storage/dom_storage_message_filter.cc
diff --git a/content/browser/dom_storage/dom_storage_message_filter.cc b/content/browser/dom_storage/dom_storage_message_filter.cc
index 91d72d32762c91999755b3c1ed5bf87bc9ad3b03..ca3bcc5ac3b10d0fa76e7a98be4c4d7a467bbc46 100644
--- a/content/browser/dom_storage/dom_storage_message_filter.cc
+++ b/content/browser/dom_storage/dom_storage_message_filter.cc
@@ -21,10 +21,8 @@
namespace content {
DOMStorageMessageFilter::DOMStorageMessageFilter(
- int render_process_id,
DOMStorageContextWrapper* context)
: BrowserMessageFilter(DOMStorageMsgStart),
- render_process_id_(render_process_id),
context_(context->context()),
connection_dispatching_message_for_(0) {
}
@@ -35,7 +33,7 @@ DOMStorageMessageFilter::~DOMStorageMessageFilter() {
void DOMStorageMessageFilter::InitializeInSequence() {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
- host_.reset(new DOMStorageHost(context_.get(), render_process_id_));
+ host_.reset(new DOMStorageHost(context_.get()));
context_->AddEventObserver(this);
}
@@ -80,7 +78,6 @@ bool DOMStorageMessageFilter::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(DOMStorageHostMsg_CloseStorageArea, OnCloseStorageArea)
IPC_MESSAGE_HANDLER(DOMStorageHostMsg_LoadStorageArea, OnLoadStorageArea)
IPC_MESSAGE_HANDLER(DOMStorageHostMsg_SetItem, OnSetItem)
- IPC_MESSAGE_HANDLER(DOMStorageHostMsg_LogGetItem, OnLogGetItem)
IPC_MESSAGE_HANDLER(DOMStorageHostMsg_RemoveItem, OnRemoveItem)
IPC_MESSAGE_HANDLER(DOMStorageHostMsg_Clear, OnClear)
IPC_MESSAGE_HANDLER(DOMStorageHostMsg_FlushMessages, OnFlushMessages)
@@ -105,10 +102,9 @@ void DOMStorageMessageFilter::OnCloseStorageArea(int connection_id) {
}
void DOMStorageMessageFilter::OnLoadStorageArea(int connection_id,
- DOMStorageValuesMap* map,
- bool* send_log_get_messages) {
+ DOMStorageValuesMap* map) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
- if (!host_->ExtractAreaValues(connection_id, map, send_log_get_messages)) {
+ if (!host_->ExtractAreaValues(connection_id, map)) {
RecordAction(base::UserMetricsAction("BadMessageTerminate_DSMF_2"));
BadMessageReceived();
}
@@ -128,13 +124,6 @@ void DOMStorageMessageFilter::OnSetItem(
Send(new DOMStorageMsg_AsyncOperationComplete(success));
}
-void DOMStorageMessageFilter::OnLogGetItem(
- int connection_id, const base::string16& key,
- const base::NullableString16& value) {
- DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
- host_->LogGetAreaItem(connection_id, key, value);
-}
-
void DOMStorageMessageFilter::OnRemoveItem(
int connection_id, const base::string16& key,
const GURL& page_url) {
@@ -193,11 +182,6 @@ void DOMStorageMessageFilter::OnDOMStorageAreaCleared(
base::NullableString16());
}
-void DOMStorageMessageFilter::OnDOMSessionStorageReset(int64 namespace_id) {
- if (host_->ResetOpenAreasForNamespace(namespace_id))
- Send(new DOMStorageMsg_ResetCachedValues(namespace_id));
-}
-
void DOMStorageMessageFilter::SendDOMStorageEvent(
const DOMStorageArea* area,
const GURL& page_url,
@@ -207,10 +191,8 @@ void DOMStorageMessageFilter::SendDOMStorageEvent(
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
// Only send mutation events to processes which have the area open.
bool originated_in_process = connection_dispatching_message_for_ != 0;
- int64 alias_namespace_id = area->namespace_id();
- if (host_->HasAreaOpen(area->namespace_id(), area->origin(),
- &alias_namespace_id) ||
- originated_in_process) {
+ if (originated_in_process ||
+ host_->HasAreaOpen(area->namespace_id(), area->origin())) {
DOMStorageMsg_Event_Params params;
params.origin = area->origin();
params.page_url = page_url;
@@ -218,7 +200,7 @@ void DOMStorageMessageFilter::SendDOMStorageEvent(
params.key = key;
params.new_value = new_value;
params.old_value = old_value;
- params.namespace_id = alias_namespace_id;
+ params.namespace_id = area->namespace_id();
Send(new DOMStorageMsg_Event(params));
}
}
« no previous file with comments | « content/browser/dom_storage/dom_storage_message_filter.h ('k') | content/browser/dom_storage/dom_storage_namespace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698