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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 bool is_exclusive, | 250 bool is_exclusive, |
251 bool is_recursive, | 251 bool is_recursive, |
252 const FileOperationCallback& callback) = 0; | 252 const FileOperationCallback& callback) = 0; |
253 | 253 |
254 // Creates a file at |file_path|. If the flag |is_exclusive| is true, an | 254 // Creates a file at |file_path|. If the flag |is_exclusive| is true, an |
255 // error is raised when a file already exists at the path. It is | 255 // error is raised when a file already exists at the path. It is |
256 // an error if a directory or a hosted document is already present at the | 256 // an error if a directory or a hosted document is already present at the |
257 // path, or the parent directory of the path is not present yet. | 257 // path, or the parent directory of the path is not present yet. |
258 // | 258 // |
259 // Can be called from UI/IO thread. |callback| is run on the calling thread | 259 // Can be called from UI/IO thread. |callback| is run on the calling thread |
| 260 // |callback| must not be null. |
260 virtual void CreateFile(const FilePath& file_path, | 261 virtual void CreateFile(const FilePath& file_path, |
261 bool is_exclusive, | 262 bool is_exclusive, |
262 const FileOperationCallback& callback) = 0; | 263 const FileOperationCallback& callback) = 0; |
263 | 264 |
264 // Gets |file_path| from the file system. The file entry represented by | 265 // Gets |file_path| from the file system. The file entry represented by |
265 // |file_path| needs to be present in in-memory representation of the file | 266 // |file_path| needs to be present in in-memory representation of the file |
266 // system in order to be retrieved. If the file is not cached, the file | 267 // system in order to be retrieved. If the file is not cached, the file |
267 // will be downloaded through gdata api. | 268 // will be downloaded through gdata api. |
268 // | 269 // |
269 // Can be called from UI/IO thread. |get_file_callback| and | 270 // Can be called from UI/IO thread. |get_file_callback| and |
(...skipping 85 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 |