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

Side by Side Diff: chrome/browser/plugins/plugin_info_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/plugins/plugin_info_message_filter.h" 5 #include "chrome/browser/plugins/plugin_info_message_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 PluginInfoMessageFilter::PluginInfoMessageFilter( 91 PluginInfoMessageFilter::PluginInfoMessageFilter(
92 int render_process_id, 92 int render_process_id,
93 Profile* profile) 93 Profile* profile)
94 : BrowserMessageFilter(ChromeMsgStart), 94 : BrowserMessageFilter(ChromeMsgStart),
95 context_(render_process_id, profile), 95 context_(render_process_id, profile),
96 weak_ptr_factory_(this) { 96 weak_ptr_factory_(this) {
97 } 97 }
98 98
99 bool PluginInfoMessageFilter::OnMessageReceived(const IPC::Message& message, 99 bool PluginInfoMessageFilter::OnMessageReceived(const IPC::Message& message) {
100 bool* message_was_ok) { 100 IPC_BEGIN_MESSAGE_MAP(PluginInfoMessageFilter, message)
101 IPC_BEGIN_MESSAGE_MAP_EX(PluginInfoMessageFilter, message, *message_was_ok)
102 IPC_MESSAGE_HANDLER_DELAY_REPLY(ChromeViewHostMsg_GetPluginInfo, 101 IPC_MESSAGE_HANDLER_DELAY_REPLY(ChromeViewHostMsg_GetPluginInfo,
103 OnGetPluginInfo) 102 OnGetPluginInfo)
104 IPC_MESSAGE_HANDLER( 103 IPC_MESSAGE_HANDLER(
105 ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType, 104 ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType,
106 OnIsInternalPluginRegisteredForMimeType) 105 OnIsInternalPluginRegisteredForMimeType)
107 IPC_MESSAGE_UNHANDLED(return false) 106 IPC_MESSAGE_UNHANDLED(return false)
108 IPC_END_MESSAGE_MAP() 107 IPC_END_MESSAGE_MAP()
109 return true; 108 return true;
110 } 109 }
111 110
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void PluginInfoMessageFilter::Context::MaybeGrantAccess( 382 void PluginInfoMessageFilter::Context::MaybeGrantAccess(
384 const ChromeViewHostMsg_GetPluginInfo_Status& status, 383 const ChromeViewHostMsg_GetPluginInfo_Status& status,
385 const base::FilePath& path) const { 384 const base::FilePath& path) const {
386 if (status.value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed || 385 if (status.value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed ||
387 status.value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay) { 386 status.value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay) {
388 ChromePluginServiceFilter::GetInstance()->AuthorizePlugin( 387 ChromePluginServiceFilter::GetInstance()->AuthorizePlugin(
389 render_process_id_, path); 388 render_process_id_, path);
390 } 389 }
391 } 390 }
392 391
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.h ('k') | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698