OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ |
7 | 7 |
8 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" | 8 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" |
9 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h" | 9 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h" |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 GDataFileError open_result, | 148 GDataFileError open_result, |
149 const FilePath& local_cache_path); | 149 const FilePath& local_cache_path); |
150 | 150 |
151 // Invoked during Truncate() operation. This is called when the truncation of | 151 // Invoked during Truncate() operation. This is called when the truncation of |
152 // a local cache file is finished on FILE thread. | 152 // a local cache file is finished on FILE thread. |
153 void DidTruncate( | 153 void DidTruncate( |
154 const FilePath& virtual_path, | 154 const FilePath& virtual_path, |
155 const fileapi::FileSystemOperationInterface::StatusCallback& callback, | 155 const fileapi::FileSystemOperationInterface::StatusCallback& callback, |
156 base::PlatformFileError* truncate_result); | 156 base::PlatformFileError* truncate_result); |
157 | 157 |
| 158 // Invoked during OpenFile() operation when truncate or write flags are set. |
| 159 // This is called when a local modifiable cached file is ready for such |
| 160 // operation. |
| 161 void OnOpenFileForWriting( |
| 162 int file_flags, |
| 163 base::ProcessHandle peer_handle, |
| 164 const fileapi::FileSystemOperationInterface::OpenFileCallback& callback, |
| 165 GDataFileError gdata_error, |
| 166 const FilePath& local_cache_path); |
| 167 |
| 168 // Invoked during OpenFile() operation when file create flags are set. |
| 169 void OnCreateFileForOpen( |
| 170 const FilePath& file_path, |
| 171 int file_flags, |
| 172 base::ProcessHandle peer_handle, |
| 173 const fileapi::FileSystemOperationInterface::OpenFileCallback& callback, |
| 174 GDataFileError gdata_error); |
| 175 |
| 176 // Invoked during OpenFile() operation when base::PLATFORM_FILE_OPEN_TRUNCATED |
| 177 // flag is set. This is called when the truncation of a local cache file is |
| 178 // finished on FILE thread. |
| 179 void OnOpenAndTruncate( |
| 180 base::ProcessHandle peer_handle, |
| 181 const fileapi::FileSystemOperationInterface::OpenFileCallback& callback, |
| 182 base::PlatformFile* platform_file, |
| 183 base::PlatformFileError* truncate_result); |
| 184 |
158 // GDataFileSystemProxy is owned by Profile, which outlives | 185 // GDataFileSystemProxy is owned by Profile, which outlives |
159 // GDataFileSystemProxy, which is owned by CrosMountPointProvider (i.e. by | 186 // GDataFileSystemProxy, which is owned by CrosMountPointProvider (i.e. by |
160 // the time Profile is removed, the file manager is already gone). Hence | 187 // the time Profile is removed, the file manager is already gone). Hence |
161 // it's safe to use this as a raw pointer. | 188 // it's safe to use this as a raw pointer. |
162 GDataFileSystemInterface* file_system_; | 189 GDataFileSystemInterface* file_system_; |
163 }; | 190 }; |
164 | 191 |
165 } // namespace chromeos | 192 } // namespace chromeos |
166 | 193 |
167 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ | 194 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ |
OLD | NEW |