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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_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 "chrome/browser/spellchecker/spellcheck_message_filter.h" 5 #include "chrome/browser/spellchecker/spellcheck_message_filter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 25 matching lines...) Expand all
36 if (message.type() == SpellCheckHostMsg_RequestDictionary::ID || 36 if (message.type() == SpellCheckHostMsg_RequestDictionary::ID ||
37 message.type() == SpellCheckHostMsg_NotifyChecked::ID || 37 message.type() == SpellCheckHostMsg_NotifyChecked::ID ||
38 message.type() == SpellCheckHostMsg_RespondDocumentMarkers::ID) 38 message.type() == SpellCheckHostMsg_RespondDocumentMarkers::ID)
39 *thread = BrowserThread::UI; 39 *thread = BrowserThread::UI;
40 #if !defined(OS_MACOSX) 40 #if !defined(OS_MACOSX)
41 if (message.type() == SpellCheckHostMsg_CallSpellingService::ID) 41 if (message.type() == SpellCheckHostMsg_CallSpellingService::ID)
42 *thread = BrowserThread::UI; 42 *thread = BrowserThread::UI;
43 #endif 43 #endif
44 } 44 }
45 45
46 bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message, 46 bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message) {
47 bool* message_was_ok) {
48 bool handled = true; 47 bool handled = true;
49 IPC_BEGIN_MESSAGE_MAP_EX(SpellCheckMessageFilter, message, *message_was_ok) 48 IPC_BEGIN_MESSAGE_MAP(SpellCheckMessageFilter, message)
50 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RequestDictionary, 49 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RequestDictionary,
51 OnSpellCheckerRequestDictionary) 50 OnSpellCheckerRequestDictionary)
52 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_NotifyChecked, 51 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_NotifyChecked,
53 OnNotifyChecked) 52 OnNotifyChecked)
54 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RespondDocumentMarkers, 53 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RespondDocumentMarkers,
55 OnRespondDocumentMarkers) 54 OnRespondDocumentMarkers)
56 #if !defined(OS_MACOSX) 55 #if !defined(OS_MACOSX)
57 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_CallSpellingService, 56 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_CallSpellingService,
58 OnCallSpellingService) 57 OnCallSpellingService)
59 #endif 58 #endif
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 base::Unretained(this), 181 base::Unretained(this),
183 route_id, 182 route_id,
184 identifier, 183 identifier,
185 markers)); 184 markers));
186 } 185 }
187 #endif 186 #endif
188 187
189 SpellcheckService* SpellCheckMessageFilter::GetSpellcheckService() const { 188 SpellcheckService* SpellCheckMessageFilter::GetSpellcheckService() const {
190 return SpellcheckServiceFactory::GetForRenderProcessId(render_process_id_); 189 return SpellcheckServiceFactory::GetForRenderProcessId(render_process_id_);
191 } 190 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_message_filter.h ('k') | chrome/browser/spellchecker/spellcheck_message_filter_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698