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

Unified Diff: chrome/browser/mime_registry_message_filter.h

Issue 5698008: Switch a bunch of remaining filters to derive from BrowserMessageFilters so t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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
« no previous file with comments | « chrome/browser/mime_registry_dispatcher.cc ('k') | chrome/browser/mime_registry_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/mime_registry_message_filter.h
===================================================================
--- chrome/browser/mime_registry_message_filter.h (revision 68877)
+++ chrome/browser/mime_registry_message_filter.h (working copy)
@@ -2,36 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_MIME_REGISTRY_DISPATCHER_H_
-#define CHROME_BROWSER_MIME_REGISTRY_DISPATCHER_H_
+#ifndef CHROME_BROWSER_MIME_REGISTRY_MESSAGE_FILTER_H_
+#define CHROME_BROWSER_MIME_REGISTRY_MESSAGE_FILTER_H_
#include "base/file_path.h"
-#include "base/ref_counted.h"
-#include "ipc/ipc_message.h"
+#include "chrome/browser/browser_message_filter.h"
-class MimeRegistryDispatcher
- : public base::RefCountedThreadSafe<MimeRegistryDispatcher> {
+class MimeRegistryMessageFilter : public BrowserMessageFilter {
public:
- explicit MimeRegistryDispatcher(IPC::Message::Sender* sender);
- void Shutdown();
- bool OnMessageReceived(const IPC::Message& message);
- void Send(IPC::Message* message);
+ MimeRegistryMessageFilter();
+ virtual void OverrideThreadForMessage(const IPC::Message& message,
+ BrowserThread::ID* thread);
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok);
+
private:
- friend class base::RefCountedThreadSafe<MimeRegistryDispatcher>;
- ~MimeRegistryDispatcher();
+ ~MimeRegistryMessageFilter();
void OnGetMimeTypeFromExtension(const FilePath::StringType& ext,
- IPC::Message* reply);
+ std::string* mime_type);
void OnGetMimeTypeFromFile(const FilePath& file_path,
- IPC::Message* reply);
+ std::string* mime_type);
void OnGetPreferredExtensionForMimeType(const std::string& mime_type,
- IPC::Message* reply);
-
- // The sender to be used for sending out IPC messages.
- IPC::Message::Sender* message_sender_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(MimeRegistryDispatcher);
+ FilePath::StringType* extension);
};
-#endif // CHROME_BROWSER_MIME_REGISTRY_DISPATCHER_H_
+#endif // CHROME_BROWSER_MIME_REGISTRY_MESSAGE_FILTER_H_
« no previous file with comments | « chrome/browser/mime_registry_dispatcher.cc ('k') | chrome/browser/mime_registry_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698