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

Unified Diff: content/browser/quota_dispatcher_host.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: Working patch 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/quota_dispatcher_host.cc
diff --git a/content/browser/quota_dispatcher_host.cc b/content/browser/quota_dispatcher_host.cc
index 2351269cbaad21efc4dab9ba16d5b744a969e454..3d42f40e32dc9cb9fdb63c001ee6e53f8291bbc2 100644
--- a/content/browser/quota_dispatcher_host.cc
+++ b/content/browser/quota_dispatcher_host.cc
@@ -19,6 +19,11 @@ using quota::QuotaStatusCode;
using quota::StorageType;
namespace content {
+namespace {
+const uint32 kFilteredMessageClasses[] = {
+ QuotaMsgStart,
+};
+} // namespace
// Created one per request to carry the request's request_id around.
// Dispatches requests from renderer/worker to the QuotaManager and
@@ -221,7 +226,9 @@ QuotaDispatcherHost::QuotaDispatcherHost(
int process_id,
QuotaManager* quota_manager,
QuotaPermissionContext* permission_context)
- : process_id_(process_id),
+ : BrowserMessageFilter(
+ kFilteredMessageClasses, arraysize(kFilteredMessageClasses)),
+ process_id_(process_id),
quota_manager_(quota_manager),
permission_context_(permission_context),
weak_factory_(this) {

Powered by Google App Engine
This is Rietveld 408576698