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

Side by Side Diff: content/browser/mime_registry_message_filter.cc

Issue 165333004: Revert "Allow MessageFilters to restrict listening to specific message classes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/mime_registry_message_filter.h" 5 #include "content/browser/mime_registry_message_filter.h"
6 6
7 #include "content/common/mime_registry_messages.h" 7 #include "content/common/mime_registry_messages.h"
8 #include "net/base/mime_util.h" 8 #include "net/base/mime_util.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 MimeRegistryMessageFilter::MimeRegistryMessageFilter() 12 MimeRegistryMessageFilter::MimeRegistryMessageFilter() {
13 : BrowserMessageFilter(MimeRegistryMsgStart) {
14 } 13 }
15 14
16 MimeRegistryMessageFilter::~MimeRegistryMessageFilter() { 15 MimeRegistryMessageFilter::~MimeRegistryMessageFilter() {
17 } 16 }
18 17
19 void MimeRegistryMessageFilter::OverrideThreadForMessage( 18 void MimeRegistryMessageFilter::OverrideThreadForMessage(
20 const IPC::Message& message, 19 const IPC::Message& message,
21 BrowserThread::ID* thread) { 20 BrowserThread::ID* thread) {
22 if (IPC_MESSAGE_CLASS(message) == MimeRegistryMsgStart) 21 if (IPC_MESSAGE_CLASS(message) == MimeRegistryMsgStart)
23 *thread = BrowserThread::FILE; 22 *thread = BrowserThread::FILE;
(...skipping 16 matching lines...) Expand all
40 const base::FilePath::StringType& ext, std::string* mime_type) { 39 const base::FilePath::StringType& ext, std::string* mime_type) {
41 net::GetMimeTypeFromExtension(ext, mime_type); 40 net::GetMimeTypeFromExtension(ext, mime_type);
42 } 41 }
43 42
44 void MimeRegistryMessageFilter::OnGetMimeTypeFromFile( 43 void MimeRegistryMessageFilter::OnGetMimeTypeFromFile(
45 const base::FilePath& file_path, std::string* mime_type) { 44 const base::FilePath& file_path, std::string* mime_type) {
46 net::GetMimeTypeFromFile(file_path, mime_type); 45 net::GetMimeTypeFromFile(file_path, mime_type);
47 } 46 }
48 47
49 } // namespace content 48 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/message_port_message_filter.cc ('k') | content/browser/profiler_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698