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

Unified Diff: chrome/browser/printing/printing_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: DCHECK valid message class OR special message type 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: chrome/browser/printing/printing_message_filter.cc
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
index 0ddeb48e0614fd167faad12f864d680ef72ee73d..823f02ea53d495b6e52f5946bf98e017371e0b0a 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -43,6 +43,10 @@ using content::BrowserThread;
namespace {
+const uint32 kFilteredMessageClasses[] = {
+ PrintMsgStart
+};
+
#if defined(OS_CHROMEOS)
typedef std::map<int, base::FilePath> SequenceToPathMap;
@@ -90,7 +94,9 @@ void RenderParamsFromPrintSettings(const printing::PrintSettings& settings,
PrintingMessageFilter::PrintingMessageFilter(int render_process_id,
Profile* profile)
- : profile_io_data_(ProfileIOData::FromResourceContext(
+ : BrowserMessageFilter(
+ kFilteredMessageClasses, arraysize(kFilteredMessageClasses)),
+ profile_io_data_(ProfileIOData::FromResourceContext(
profile->GetResourceContext())),
render_process_id_(render_process_id),
queue_(g_browser_process->print_job_manager()->queue()) {

Powered by Google App Engine
This is Rietveld 408576698