| 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_
|
|
|