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

Side by Side Diff: content/browser/dom_storage/dom_storage_message_filter.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/dom_storage/dom_storage_message_filter.h" 5 #include "content/browser/dom_storage/dom_storage_message_filter.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/strings/nullable_string16.h" 9 #include "base/strings/nullable_string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 base::Bind(&DOMStorageMessageFilter::UninitializeInSequence, this)); 61 base::Bind(&DOMStorageMessageFilter::UninitializeInSequence, this));
62 } 62 }
63 63
64 base::TaskRunner* DOMStorageMessageFilter::OverrideTaskRunnerForMessage( 64 base::TaskRunner* DOMStorageMessageFilter::OverrideTaskRunnerForMessage(
65 const IPC::Message& message) { 65 const IPC::Message& message) {
66 if (IPC_MESSAGE_CLASS(message) == DOMStorageMsgStart) 66 if (IPC_MESSAGE_CLASS(message) == DOMStorageMsgStart)
67 return context_->task_runner(); 67 return context_->task_runner();
68 return NULL; 68 return NULL;
69 } 69 }
70 70
71 bool DOMStorageMessageFilter::OnMessageReceived(const IPC::Message& message, 71 bool DOMStorageMessageFilter::OnMessageReceived(const IPC::Message& message) {
72 bool* message_was_ok) {
73 if (IPC_MESSAGE_CLASS(message) != DOMStorageMsgStart) 72 if (IPC_MESSAGE_CLASS(message) != DOMStorageMsgStart)
74 return false; 73 return false;
75 DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); 74 DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
76 DCHECK(host_.get()); 75 DCHECK(host_.get());
77 76
78 bool handled = true; 77 bool handled = true;
79 IPC_BEGIN_MESSAGE_MAP_EX(DOMStorageMessageFilter, message, *message_was_ok) 78 IPC_BEGIN_MESSAGE_MAP(DOMStorageMessageFilter, message)
80 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_OpenStorageArea, OnOpenStorageArea) 79 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_OpenStorageArea, OnOpenStorageArea)
81 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_CloseStorageArea, OnCloseStorageArea) 80 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_CloseStorageArea, OnCloseStorageArea)
82 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_LoadStorageArea, OnLoadStorageArea) 81 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_LoadStorageArea, OnLoadStorageArea)
83 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_SetItem, OnSetItem) 82 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_SetItem, OnSetItem)
84 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_LogGetItem, OnLogGetItem) 83 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_LogGetItem, OnLogGetItem)
85 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_RemoveItem, OnRemoveItem) 84 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_RemoveItem, OnRemoveItem)
86 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_Clear, OnClear) 85 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_Clear, OnClear)
87 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_FlushMessages, OnFlushMessages) 86 IPC_MESSAGE_HANDLER(DOMStorageHostMsg_FlushMessages, OnFlushMessages)
88 IPC_MESSAGE_UNHANDLED(handled = false) 87 IPC_MESSAGE_UNHANDLED(handled = false)
89 IPC_END_MESSAGE_MAP() 88 IPC_END_MESSAGE_MAP()
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 params.connection_id = connection_dispatching_message_for_; 217 params.connection_id = connection_dispatching_message_for_;
219 params.key = key; 218 params.key = key;
220 params.new_value = new_value; 219 params.new_value = new_value;
221 params.old_value = old_value; 220 params.old_value = old_value;
222 params.namespace_id = alias_namespace_id; 221 params.namespace_id = alias_namespace_id;
223 Send(new DOMStorageMsg_Event(params)); 222 Send(new DOMStorageMsg_Event(params));
224 } 223 }
225 } 224 }
226 225
227 } // namespace content 226 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_message_filter.h ('k') | content/browser/fileapi/fileapi_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698