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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // - |src_file_path| cannot be a regular file (i.e. non-hosted document) | 192 // - |src_file_path| cannot be a regular file (i.e. non-hosted document) |
193 // or a directory. | 193 // or a directory. |
194 // - |dest_file_path| must not exist. | 194 // - |dest_file_path| must not exist. |
195 // - The parent of |dest_file_path| must already exist. | 195 // - The parent of |dest_file_path| must already exist. |
196 // | 196 // |
197 // The file entries represented by |src_file_path| and the parent directory | 197 // The file entries represented by |src_file_path| and the parent directory |
198 // of |dest_file_path| need to be present in the in-memory representation | 198 // of |dest_file_path| need to be present in the in-memory representation |
199 // of the file system. | 199 // of the file system. |
200 // | 200 // |
201 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 201 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
| 202 // |callback| must not be null. |
202 virtual void Copy(const FilePath& src_file_path, | 203 virtual void Copy(const FilePath& src_file_path, |
203 const FilePath& dest_file_path, | 204 const FilePath& dest_file_path, |
204 const FileOperationCallback& callback) = 0; | 205 const FileOperationCallback& callback) = 0; |
205 | 206 |
206 // Moves |src_file_path| to |dest_file_path| on the file system. | 207 // Moves |src_file_path| to |dest_file_path| on the file system. |
207 // |src_file_path| can be a file (regular or hosted document) or a directory. | 208 // |src_file_path| can be a file (regular or hosted document) or a directory. |
208 // |dest_file_path| is expected to be of the same type of |src_file_path| | 209 // |dest_file_path| is expected to be of the same type of |src_file_path| |
209 // (i.e. if |src_file_path| is a file, |dest_file_path| will be created as | 210 // (i.e. if |src_file_path| is a file, |dest_file_path| will be created as |
210 // a file). | 211 // a file). |
211 // | 212 // |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 const FilePath& virtual_dir_path, | 352 const FilePath& virtual_dir_path, |
352 scoped_ptr<DocumentEntry> entry, | 353 scoped_ptr<DocumentEntry> entry, |
353 const FilePath& file_content_path, | 354 const FilePath& file_content_path, |
354 GDataCache::FileOperationType cache_operation, | 355 GDataCache::FileOperationType cache_operation, |
355 const base::Closure& callback) = 0; | 356 const base::Closure& callback) = 0; |
356 }; | 357 }; |
357 | 358 |
358 } // namespace gdata | 359 } // namespace gdata |
359 | 360 |
360 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 361 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |