Chromium Code Reviews| Index: chrome/browser/chromeos/gdata/gdata_file_system.h |
| diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h |
| index 923406c52b415b00d4a71c6700bfea2a35e45058..6056d7ab50459a7a24a51ff6c59665edbac7a19f 100644 |
| --- a/chrome/browser/chromeos/gdata/gdata_file_system.h |
| +++ b/chrome/browser/chromeos/gdata/gdata_file_system.h |
| @@ -390,21 +390,22 @@ class GDataFileSystem : public GDataFileSystemInterface, |
| const FileOperationCallback& callback, |
| scoped_ptr<EntryInfoPairResult> result); |
| - // Removes a file or directory at |file_path| from the directory at |
| - // |dir_path| and moves it to the root directory. |
| + // Removes a file or directory at |file_path| from the current directory if |
| + // it's not in the root directory. This essentially moves an entry to the |
| + // root directory on the server side. |
| // |
| // Can be called from UI thread. |callback| is run on the calling thread. |
| - void RemoveEntryFromDirectory(const FilePath& dir_path, |
| - const FileMoveCallback& callback, |
| - GDataFileError error, |
| - const FilePath& file_path); |
| + // |callback| must not be null. |
| + void RemoveEntryFromNonRootDirectory(const FileMoveCallback& callback, |
| + GDataFileError error, |
| + const FilePath& file_path); |
| - // Removes file under |file_path| from in-memory snapshot of the file system. |
| + // Removes file under |file_path| on the client side. |
| // |resource_id| contains the resource id of the removed file if it was a |
| // file. |
| // Return PLATFORM_FILE_OK if successful. |
| - GDataFileError RemoveEntryFromGData(const FilePath& file_path, |
| - std::string* resource_id); |
| + GDataFileError RemoveEntryOnClientSide(const FilePath& file_path, |
| + std::string* resource_id); |
| // A pass-through callback used for bridging from |
| // FileMoveCallback to FileOperationCallback. |
| @@ -498,39 +499,42 @@ class GDataFileSystem : public GDataFileSystemInterface, |
| const std::string& md5); |
| // Callback for handling resource rename attempt. Renames a file or |
| - // directory at |file_path| on in-memory snapshot of the file system. |
| - void RenameFileOnFileSystem(const FilePath& file_path, |
| + // directory at |file_path| on the client side. |
| + // |callback| must not be null. |
| + void RenameFileOnClientSide(const FilePath& file_path, |
|
achuithb
2012/08/10 08:59:13
Not sure I like OnClientSide. How about Locally? S
satorux1
2012/08/10 15:56:03
Locally sounds good. Fixed everywhere. Kept "on th
|
| const FilePath::StringType& new_name, |
| const FileMoveCallback& callback, |
| GDataErrorCode status, |
| const GURL& document_url); |
| // Callback for handling an attempt to remove a file or directory from |
| - // another directory. Removes a file or directory at |file_path| and moves it |
| - // to root on in-memory snapshot of the file system. |
| - void RemoveEntryFromDirectoryOnFileSystem( |
| + // another directory. Moves a file or directory at |file_path| to root on |
| + // the client side. |
| + // |callback| must not be null. |
| + void MoveEntryToRootDirectoryOnClientSide( |
| const FileMoveCallback& callback, |
| const FilePath& file_path, |
| const FilePath& dir_path, |
| GDataErrorCode status, |
| const GURL& document_url); |
| - // Removes a file or directory under |file_path| from in-memory snapshot of |
| - // the file system and the corresponding file from cache if it exists. |
| - // Return PLATFORM_FILE_OK if successful. |
| - GDataFileError RemoveEntryFromFileSystem(const FilePath& file_path); |
| + // Removes a file or directory under |file_path| on the client side and the |
| + // corresponding file from cache if it exists. Returns PLATFORM_FILE_OK if |
| + // successful. |
| + GDataFileError RemoveEntryOnClientSide(const FilePath& file_path); |
|
achuithb
2012/08/10 08:59:13
Method overloading is forbidden. You need a differ
satorux1
2012/08/10 15:56:03
Good catch!! Didn't expect a name collision after
|
| - // Callback for GDataDirectoryService::MoveEntryToDirectory with |
| - // FileMoveCallback. |
| - void OnMoveEntryToDirectoryWithFileMoveCallback( |
| + // Callback when an entry is moved to another directory on the client side. |
| + // Notifies the directory change and runs |callback|. |
| + // |callback| must not be null. |
| + void NotifyAndRunFileMoveCallback( |
| const FileMoveCallback& callback, |
| GDataFileError error, |
| const FilePath& moved_file_path); |
| - // Callback for GDataDirectoryService::MoveEntryToDirectory with |
| - // FileOperationCallback. |
| + // Callback when an entry is moved to another directory on the client side. |
| + // Notifies the directory change and runs |callback|. |
| // |callback| must not be null. |
| - void OnMoveEntryToDirectoryWithFileOperationCallback( |
| + void NotifyAndRunFileOperationCallback( |
| const FileOperationCallback& callback, |
| GDataFileError error, |
| const FilePath& moved_file_path); |