| 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_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 // Removes |file_path| from the file system. If |is_recursive| is set and | 221 // Removes |file_path| from the file system. If |is_recursive| is set and |
| 222 // |file_path| represents a directory, we will also delete all of its | 222 // |file_path| represents a directory, we will also delete all of its |
| 223 // contained children elements. The file entry represented by |file_path| | 223 // contained children elements. The file entry represented by |file_path| |
| 224 // needs to be present in in-memory representation of the file system that | 224 // needs to be present in in-memory representation of the file system that |
| 225 // in order to be removed. | 225 // in order to be removed. |
| 226 // | 226 // |
| 227 // TODO(satorux): is_recursive is not supported yet. crbug.com/138282 | 227 // TODO(satorux): is_recursive is not supported yet. crbug.com/138282 |
| 228 // | 228 // |
| 229 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 229 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
| 230 // |callback| must not be null. |
| 230 virtual void Remove(const FilePath& file_path, | 231 virtual void Remove(const FilePath& file_path, |
| 231 bool is_recursive, | 232 bool is_recursive, |
| 232 const FileOperationCallback& callback) = 0; | 233 const FileOperationCallback& callback) = 0; |
| 233 | 234 |
| 234 // Creates new directory under |directory_path|. If |is_exclusive| is true, | 235 // Creates new directory under |directory_path|. If |is_exclusive| is true, |
| 235 // an error is raised in case a directory is already present at the | 236 // an error is raised in case a directory is already present at the |
| 236 // |directory_path|. If |is_recursive| is true, the call creates parent | 237 // |directory_path|. If |is_recursive| is true, the call creates parent |
| 237 // directories as needed just like mkdir -p does. | 238 // directories as needed just like mkdir -p does. |
| 238 // | 239 // |
| 239 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 240 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 virtual void UpdateEntryData(const std::string& resource_id, | 360 virtual void UpdateEntryData(const std::string& resource_id, |
| 360 const std::string& md5, | 361 const std::string& md5, |
| 361 scoped_ptr<DocumentEntry> entry, | 362 scoped_ptr<DocumentEntry> entry, |
| 362 const FilePath& file_content_path, | 363 const FilePath& file_content_path, |
| 363 const base::Closure& callback) = 0; | 364 const base::Closure& callback) = 0; |
| 364 }; | 365 }; |
| 365 | 366 |
| 366 } // namespace gdata | 367 } // namespace gdata |
| 367 | 368 |
| 368 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 369 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| OLD | NEW |