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_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // Otherwise, GData file system does not pick up the file for uploading. | 173 // Otherwise, GData file system does not pick up the file for uploading. |
174 // | 174 // |
175 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 175 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
176 virtual void OpenFile(const FilePath& file_path, | 176 virtual void OpenFile(const FilePath& file_path, |
177 const OpenFileCallback& callback) = 0; | 177 const OpenFileCallback& callback) = 0; |
178 | 178 |
179 // Closes a file at the virtual path |file_path| on the gdata file system, | 179 // Closes a file at the virtual path |file_path| on the gdata file system, |
180 // which is opened via OpenFile(). It commits the dirty flag on the cache. | 180 // which is opened via OpenFile(). It commits the dirty flag on the cache. |
181 // | 181 // |
182 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 182 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
| 183 // |callback| must not be null. |
183 virtual void CloseFile(const FilePath& file_path, | 184 virtual void CloseFile(const FilePath& file_path, |
184 const FileOperationCallback& callback) = 0; | 185 const FileOperationCallback& callback) = 0; |
185 | 186 |
186 // Copies |src_file_path| to |dest_file_path| on the file system. | 187 // Copies |src_file_path| to |dest_file_path| on the file system. |
187 // |src_file_path| can be a hosted document (see limitations below). | 188 // |src_file_path| can be a hosted document (see limitations below). |
188 // |dest_file_path| is expected to be of the same type of |src_file_path| | 189 // |dest_file_path| is expected to be of the same type of |src_file_path| |
189 // (i.e. if |src_file_path| is a file, |dest_file_path| will be created as | 190 // (i.e. if |src_file_path| is a file, |dest_file_path| will be created as |
190 // a file). | 191 // a file). |
191 // | 192 // |
192 // This method also has the following assumptions/limitations that may be | 193 // This method also has the following assumptions/limitations that may be |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 const FilePath& virtual_dir_path, | 356 const FilePath& virtual_dir_path, |
356 scoped_ptr<DocumentEntry> entry, | 357 scoped_ptr<DocumentEntry> entry, |
357 const FilePath& file_content_path, | 358 const FilePath& file_content_path, |
358 GDataCache::FileOperationType cache_operation, | 359 GDataCache::FileOperationType cache_operation, |
359 const base::Closure& callback) = 0; | 360 const base::Closure& callback) = 0; |
360 }; | 361 }; |
361 | 362 |
362 } // namespace gdata | 363 } // namespace gdata |
363 | 364 |
364 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 365 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |