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

Unified Diff: content/browser/fileapi/fileapi_message_filter.cc

Issue 142923005: Allow MessageFilters to restrict listening to specific message classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/fileapi/fileapi_message_filter.cc
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 81f61d84b57b22382c22708ac5536245bfc31e88..97cd949cb18d776c1d693d5837749a4a07b20c89 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -53,6 +53,11 @@ namespace content {
namespace {
+const uint32 kFilteredMessageClasses[] = {
+ BlobMsgStart,
+ FileSystemMsgStart,
+};
+
void RevokeFilePermission(int child_id, const base::FilePath& path) {
ChildProcessSecurityPolicyImpl::GetInstance()->RevokeAllPermissionsForFile(
child_id, path);
@@ -66,7 +71,9 @@ FileAPIMessageFilter::FileAPIMessageFilter(
fileapi::FileSystemContext* file_system_context,
ChromeBlobStorageContext* blob_storage_context,
StreamContext* stream_context)
- : process_id_(process_id),
+ : BrowserMessageFilter(
+ kFilteredMessageClasses, arraysize(kFilteredMessageClasses)),
+ process_id_(process_id),
context_(file_system_context),
security_policy_(ChildProcessSecurityPolicyImpl::GetInstance()),
request_context_getter_(request_context_getter),
@@ -85,7 +92,9 @@ FileAPIMessageFilter::FileAPIMessageFilter(
fileapi::FileSystemContext* file_system_context,
ChromeBlobStorageContext* blob_storage_context,
StreamContext* stream_context)
- : process_id_(process_id),
+ : BrowserMessageFilter(
+ kFilteredMessageClasses, arraysize(kFilteredMessageClasses)),
+ process_id_(process_id),
context_(file_system_context),
security_policy_(ChildProcessSecurityPolicyImpl::GetInstance()),
request_context_(request_context),
« no previous file with comments | « content/browser/dom_storage/dom_storage_message_filter.cc ('k') | content/browser/frame_host/render_frame_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698