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

Side by Side Diff: chrome/browser/file_system/file_system_dispatcher_host.h

Issue 3244002: (2nd try) Add a helper class that keeps per-profile information for FileSystem API (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/file_system/file_system_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 5 #ifndef CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
6 #define CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 6 #define CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/nullable_string16.h" 9 #include "base/nullable_string16.h"
10 #include "base/process.h" 10 #include "base/process.h"
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "chrome/common/render_messages.h" 12 #include "chrome/common/render_messages.h"
13 13
14 class FileSystemHostContext;
14 class HostContentSettingsMap; 15 class HostContentSettingsMap;
15 class Receiver; 16 class Receiver;
16 class ResourceMessageFilter; 17 class ResourceMessageFilter;
17 18
18 class FileSystemDispatcherHost 19 class FileSystemDispatcherHost
19 : public base::RefCountedThreadSafe<FileSystemDispatcherHost> { 20 : public base::RefCountedThreadSafe<FileSystemDispatcherHost> {
20 public: 21 public:
21 FileSystemDispatcherHost(IPC::Message::Sender* sender, 22 FileSystemDispatcherHost(IPC::Message::Sender* sender,
23 FileSystemHostContext* file_system_host_context,
22 HostContentSettingsMap* host_content_settings_map); 24 HostContentSettingsMap* host_content_settings_map);
23 void Init(base::ProcessHandle process_handle); 25 void Init(base::ProcessHandle process_handle);
24 void Shutdown(); 26 void Shutdown();
25 27
26 bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); 28 bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok);
27 29
28 void OnOpenFileSystem(const ViewHostMsg_OpenFileSystemRequest_Params&); 30 void OnOpenFileSystem(const ViewHostMsg_OpenFileSystemRequest_Params&);
29 void OnMove( 31 void OnMove(
30 int request_id, 32 int request_id,
31 const string16& src_path, 33 const string16& src_path,
32 const string16& dest_path); 34 const string16& dest_path);
33 35
34 // TODO(kinuko): add more methods. 36 // TODO(kinuko): add more methods.
35 37
36 void Send(IPC::Message* message); 38 void Send(IPC::Message* message);
37 39
38 private: 40 private:
39 void Move(const string16& src, const string16& dest, int operation_id); 41 void Move(const string16& src, const string16& dest, int operation_id);
40 42
41 // The sender to be used for sending out IPC messages. 43 // The sender to be used for sending out IPC messages.
42 IPC::Message::Sender* message_sender_; 44 IPC::Message::Sender* message_sender_;
43 45
44 // The handle of this process. 46 // The handle of this process.
45 base::ProcessHandle process_handle_; 47 base::ProcessHandle process_handle_;
46 48
47 bool shutdown_; 49 bool shutdown_;
48 50
51 scoped_refptr<FileSystemHostContext> context_;
52
49 // Used to look up permissions. 53 // Used to look up permissions.
50 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 54 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
51 }; 55 };
52 56
53 #endif // CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 57 #endif // CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/file_system/file_system_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698