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

Side by Side Diff: content/shell/browser/shell_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/shell_message_filter.h" 5 #include "content/shell/browser/shell_message_filter.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "content/public/browser/child_process_security_policy.h" 9 #include "content/public/browser/child_process_security_policy.h"
10 #include "content/shell/browser/shell_browser_context.h" 10 #include "content/shell/browser/shell_browser_context.h"
(...skipping 24 matching lines...) Expand all
35 35
36 ShellMessageFilter::~ShellMessageFilter() { 36 ShellMessageFilter::~ShellMessageFilter() {
37 } 37 }
38 38
39 void ShellMessageFilter::OverrideThreadForMessage(const IPC::Message& message, 39 void ShellMessageFilter::OverrideThreadForMessage(const IPC::Message& message,
40 BrowserThread::ID* thread) { 40 BrowserThread::ID* thread) {
41 if (message.type() == ShellViewHostMsg_ClearAllDatabases::ID) 41 if (message.type() == ShellViewHostMsg_ClearAllDatabases::ID)
42 *thread = BrowserThread::FILE; 42 *thread = BrowserThread::FILE;
43 } 43 }
44 44
45 bool ShellMessageFilter::OnMessageReceived(const IPC::Message& message, 45 bool ShellMessageFilter::OnMessageReceived(const IPC::Message& message) {
46 bool* message_was_ok) {
47 bool handled = true; 46 bool handled = true;
48 IPC_BEGIN_MESSAGE_MAP_EX(ShellMessageFilter, message, *message_was_ok) 47 IPC_BEGIN_MESSAGE_MAP(ShellMessageFilter, message)
49 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ReadFileToString, OnReadFileToString) 48 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ReadFileToString, OnReadFileToString)
50 IPC_MESSAGE_HANDLER(ShellViewHostMsg_RegisterIsolatedFileSystem, 49 IPC_MESSAGE_HANDLER(ShellViewHostMsg_RegisterIsolatedFileSystem,
51 OnRegisterIsolatedFileSystem) 50 OnRegisterIsolatedFileSystem)
52 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ClearAllDatabases, OnClearAllDatabases) 51 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ClearAllDatabases, OnClearAllDatabases)
53 IPC_MESSAGE_HANDLER(ShellViewHostMsg_SetDatabaseQuota, OnSetDatabaseQuota) 52 IPC_MESSAGE_HANDLER(ShellViewHostMsg_SetDatabaseQuota, OnSetDatabaseQuota)
54 IPC_MESSAGE_HANDLER(ShellViewHostMsg_AcceptAllCookies, OnAcceptAllCookies) 53 IPC_MESSAGE_HANDLER(ShellViewHostMsg_AcceptAllCookies, OnAcceptAllCookies)
55 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DeleteAllCookies, OnDeleteAllCookies) 54 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DeleteAllCookies, OnDeleteAllCookies)
56 IPC_MESSAGE_UNHANDLED(handled = false) 55 IPC_MESSAGE_UNHANDLED(handled = false)
57 IPC_END_MESSAGE_MAP() 56 IPC_END_MESSAGE_MAP()
58 57
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 ShellNetworkDelegate::SetAcceptAllCookies(accept); 96 ShellNetworkDelegate::SetAcceptAllCookies(accept);
98 } 97 }
99 98
100 void ShellMessageFilter::OnDeleteAllCookies() { 99 void ShellMessageFilter::OnDeleteAllCookies() {
101 request_context_getter_->GetURLRequestContext()->cookie_store() 100 request_context_getter_->GetURLRequestContext()->cookie_store()
102 ->GetCookieMonster() 101 ->GetCookieMonster()
103 ->DeleteAllAsync(net::CookieMonster::DeleteCallback()); 102 ->DeleteAllAsync(net::CookieMonster::DeleteCallback());
104 } 103 }
105 104
106 } // namespace content 105 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_message_filter.h ('k') | extensions/browser/extension_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698