OLD | NEW |
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 <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 const FilePath& path, | 72 const FilePath& path, |
73 const GURL& blob_url, | 73 const GURL& blob_url, |
74 int64 offset); | 74 int64 offset); |
75 void OnTruncate(int request_id, const FilePath& path, int64 length); | 75 void OnTruncate(int request_id, const FilePath& path, int64 length); |
76 void OnTouchFile(int request_id, | 76 void OnTouchFile(int request_id, |
77 const FilePath& path, | 77 const FilePath& path, |
78 const base::Time& last_access_time, | 78 const base::Time& last_access_time, |
79 const base::Time& last_modified_time); | 79 const base::Time& last_modified_time); |
80 void OnCancel(int request_id, int request_to_cancel); | 80 void OnCancel(int request_id, int request_to_cancel); |
81 void Send(IPC::Message* message); | 81 void Send(IPC::Message* message); |
82 void RemoveCompletedOperation(int request_id); | 82 void UnregisterOperation(int request_id); |
83 | 83 |
84 private: | 84 private: |
85 // Creates a new SandboxedFileSystemOperation. | 85 // Creates a new SandboxedFileSystemOperation. |
86 fileapi::SandboxedFileSystemOperation* GetNewOperation(int request_id); | 86 fileapi::SandboxedFileSystemOperation* GetNewOperation(int request_id); |
87 | 87 |
88 // The sender to be used for sending out IPC messages. | 88 // The sender to be used for sending out IPC messages. |
89 IPC::Message::Sender* message_sender_; | 89 IPC::Message::Sender* message_sender_; |
90 | 90 |
91 // The handle of this process. | 91 // The handle of this process. |
92 base::ProcessHandle process_handle_; | 92 base::ProcessHandle process_handle_; |
93 | 93 |
94 bool shutdown_; | 94 bool shutdown_; |
95 | 95 |
96 scoped_refptr<BrowserFileSystemContext> context_; | 96 scoped_refptr<BrowserFileSystemContext> context_; |
97 | 97 |
98 // Used to look up permissions. | 98 // Used to look up permissions. |
99 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 99 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
100 | 100 |
101 // Keeps ongoing file system operations. | 101 // Keeps ongoing file system operations. |
102 typedef IDMap<fileapi::SandboxedFileSystemOperation, IDMapOwnPointer> | 102 typedef IDMap<fileapi::SandboxedFileSystemOperation> OperationsMap; |
103 OperationsMap; | |
104 OperationsMap operations_; | 103 OperationsMap operations_; |
105 | 104 |
106 // This holds the URLRequestContextGetter until Init() can be called from the | 105 // This holds the URLRequestContextGetter until Init() can be called from the |
107 // IO thread, which will extract the URLRequestContext from it. | 106 // IO thread, which will extract the URLRequestContext from it. |
108 scoped_refptr<URLRequestContextGetter> request_context_getter_; | 107 scoped_refptr<URLRequestContextGetter> request_context_getter_; |
109 scoped_refptr<URLRequestContext> request_context_; | 108 scoped_refptr<URLRequestContext> request_context_; |
110 | 109 |
111 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost); | 110 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost); |
112 }; | 111 }; |
113 | 112 |
114 #endif // CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ | 113 #endif // CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ |
OLD | NEW |