Chromium Code Reviews| Index: chrome/browser/chromeos/gdata/gdata_files.h |
| =================================================================== |
| --- chrome/browser/chromeos/gdata/gdata_files.h (revision 150448) |
| +++ chrome/browser/chromeos/gdata/gdata_files.h (working copy) |
| @@ -74,6 +74,11 @@ |
| typedef base::Callback<void(GDataFileError error)> |
| FileOperationCallback; |
| +// Callback similar to FileOperationCallback but with a given |file_path|. |
| +typedef base::Callback<void(GDataFileError error, |
| + const FilePath& file_path)> |
| + FilePathUpdateCallback; |
| + |
| // Base class for representing files and directories in gdata virtual file |
| // system. |
| class GDataEntry { |
| @@ -281,11 +286,6 @@ |
| bool FromProto(const GDataDirectoryProto& proto) WARN_UNUSED_RESULT; |
| void ToProto(GDataDirectoryProto* proto) const; |
| - // Removes child elements. |
| - void RemoveChildren(); |
| - void RemoveChildFiles(); |
| - void RemoveChildDirectories(); |
| - |
| // Collection of children files/directories. |
| const GDataFileCollection& child_files() const { return child_files_; } |
| const GDataDirectoryCollection& child_directories() const { |
| @@ -309,13 +309,6 @@ |
| // TODO(satorux): Remove this. crbug.com/139649 |
| void RemoveEntry(GDataEntry* entry); |
| - // Takes the ownership of |entry| from its current parent. If this directory |
| - // is already the current parent of |file|, this method effectively goes |
| - // through the name de-duplication for |file| based on the current state of |
| - // the file system. |
| - // TODO(satorux): Remove this. crbug.com/139649 |
| - bool TakeEntry(GDataEntry* entry); |
| - |
| // Takes over all entries from |dir|. |
| // TODO(satorux): Remove this. crbug.com/139649 |
| bool TakeOverEntries(GDataDirectory* dir); |
| @@ -331,6 +324,11 @@ |
| // entry instance. |
| void RemoveChild(GDataEntry* entry); |
| + // Removes child elements. |
| + void RemoveChildren(); |
| + void RemoveChildFiles(); |
| + void RemoveChildDirectories(); |
| + |
| // Collection of children GDataEntry items. |
| GDataFileCollection child_files_; |
| GDataDirectoryCollection child_directories_; |
| @@ -374,7 +372,7 @@ |
| // Must be called on UI thread. |callback| is called on the UI thread. |
|
satorux1
2012/08/08 14:09:06
The semantics of the function seems to be changed.
achuithb
2012/08/08 22:08:41
I can update the comment to state that the entry i
|
| void AddEntryToDirectory(const FilePath& directory_path, |
| GDataEntry* entry, |
| - const FileOperationCallback& callback); |
| + const FilePathUpdateCallback& callback); |
| // Adds the entry to resource map. |
| void AddEntryToResourceMap(GDataEntry* entry); |