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

Side by Side Diff: chrome/browser/renderer_host/chrome_render_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/renderer_host/chrome_render_message_filter.h" 5 #include "chrome/browser/renderer_host/chrome_render_message_filter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 off_the_record_(profile_->IsOffTheRecord()), 89 off_the_record_(profile_->IsOffTheRecord()),
90 predictor_(profile_->GetNetworkPredictor()), 90 predictor_(profile_->GetNetworkPredictor()),
91 request_context_(request_context), 91 request_context_(request_context),
92 extension_info_map_( 92 extension_info_map_(
93 extensions::ExtensionSystem::Get(profile)->info_map()), 93 extensions::ExtensionSystem::Get(profile)->info_map()),
94 cookie_settings_(CookieSettings::Factory::GetForProfile(profile)) {} 94 cookie_settings_(CookieSettings::Factory::GetForProfile(profile)) {}
95 95
96 ChromeRenderMessageFilter::~ChromeRenderMessageFilter() { 96 ChromeRenderMessageFilter::~ChromeRenderMessageFilter() {
97 } 97 }
98 98
99 bool ChromeRenderMessageFilter::OnMessageReceived(const IPC::Message& message, 99 bool ChromeRenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
100 bool* message_was_ok) {
101 bool handled = true; 100 bool handled = true;
102 IPC_BEGIN_MESSAGE_MAP_EX(ChromeRenderMessageFilter, message, *message_was_ok) 101 IPC_BEGIN_MESSAGE_MAP(ChromeRenderMessageFilter, message)
103 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DnsPrefetch, OnDnsPrefetch) 102 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DnsPrefetch, OnDnsPrefetch)
104 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_Preconnect, OnPreconnect) 103 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_Preconnect, OnPreconnect)
105 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ResourceTypeStats, 104 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ResourceTypeStats,
106 OnResourceTypeStats) 105 OnResourceTypeStats)
107 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_UpdatedCacheStats, 106 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_UpdatedCacheStats,
108 OnUpdatedCacheStats) 107 OnUpdatedCacheStats)
109 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FPS, OnFPS) 108 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FPS, OnFPS)
110 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_V8HeapStats, OnV8HeapStats) 109 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_V8HeapStats, OnV8HeapStats)
111 IPC_MESSAGE_HANDLER(ExtensionHostMsg_OpenChannelToExtension, 110 IPC_MESSAGE_HANDLER(ExtensionHostMsg_OpenChannelToExtension,
112 OnOpenChannelToExtension) 111 OnOpenChannelToExtension)
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // Since all extensions could historically write to the clipboard, preserve it 470 // Since all extensions could historically write to the clipboard, preserve it
472 // for compatibility. 471 // for compatibility.
473 *allowed = (origin.SchemeIs(extensions::kExtensionScheme) || 472 *allowed = (origin.SchemeIs(extensions::kExtensionScheme) ||
474 extension_info_map_->SecurityOriginHasAPIPermission( 473 extension_info_map_->SecurityOriginHasAPIPermission(
475 origin, render_process_id_, APIPermission::kClipboardWrite)); 474 origin, render_process_id_, APIPermission::kClipboardWrite));
476 } 475 }
477 476
478 void ChromeRenderMessageFilter::OnIsCrashReportingEnabled(bool* enabled) { 477 void ChromeRenderMessageFilter::OnIsCrashReportingEnabled(bool* enabled) {
479 *enabled = MetricsServiceHelper::IsCrashReportingEnabled(); 478 *enabled = MetricsServiceHelper::IsCrashReportingEnabled();
480 } 479 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698