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

Unified Diff: chrome/browser/file_system/file_system_dispatcher_host.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
Index: chrome/browser/file_system/file_system_dispatcher_host.h
===================================================================
--- chrome/browser/file_system/file_system_dispatcher_host.h (revision 68877)
+++ chrome/browser/file_system/file_system_dispatcher_host.h (working copy)
@@ -9,9 +9,7 @@
#include "base/basictypes.h"
#include "base/id_map.h"
-#include "base/process.h"
-#include "base/ref_counted.h"
-#include "ipc/ipc_message.h"
+#include "chrome/browser/browser_message_filter.h"
#include "webkit/fileapi/file_system_types.h"
namespace base {
@@ -33,21 +31,20 @@
class SandboxedFileSystemOperation;
}
-class FileSystemDispatcherHost
- : public base::RefCountedThreadSafe<FileSystemDispatcherHost> {
+class FileSystemDispatcherHost : public BrowserMessageFilter {
public:
// Used by the renderer.
- FileSystemDispatcherHost(IPC::Message::Sender* sender,
- Profile* profile);
+ explicit FileSystemDispatcherHost(Profile* profile);
// Used by the worker, since it has the context handy already.
- FileSystemDispatcherHost(IPC::Message::Sender* sender,
- ChromeURLRequestContext* context);
+ explicit FileSystemDispatcherHost(ChromeURLRequestContext* context);
~FileSystemDispatcherHost();
- void Init(base::ProcessHandle process_handle);
- void Shutdown();
- bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok);
+ // BrowserMessageFilter implementation.
+ virtual void OnChannelConnected(int32 peer_pid);
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok);
+
void OnOpenFileSystem(int request_id,
const GURL& origin_url,
fileapi::FileSystemType type,
@@ -78,21 +75,12 @@
const base::Time& last_access_time,
const base::Time& last_modified_time);
void OnCancel(int request_id, int request_to_cancel);
- void Send(IPC::Message* message);
void UnregisterOperation(int request_id);
private:
// Creates a new SandboxedFileSystemOperation.
fileapi::SandboxedFileSystemOperation* GetNewOperation(int request_id);
- // The sender to be used for sending out IPC messages.
- IPC::Message::Sender* message_sender_;
-
- // The handle of this process.
- base::ProcessHandle process_handle_;
-
- bool shutdown_;
-
scoped_refptr<BrowserFileSystemContext> context_;
// Used to look up permissions.
« no previous file with comments | « chrome/browser/device_orientation/message_filter.cc ('k') | chrome/browser/file_system/file_system_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698