Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5229)

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.h

Issue 10827211: Replace GDataDirectory::TakeEntry with GDataDirectoryService::AddEntryToDirectory. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/gdata_file_system.h
===================================================================
--- chrome/browser/chromeos/gdata/gdata_file_system.h (revision 150441)
+++ chrome/browser/chromeos/gdata/gdata_file_system.h (working copy)
@@ -171,10 +171,6 @@
// execution of GetFileByPath() method.
struct GetFileFromCacheParams;
- // Callback similar to FileOperationCallback but with a given |file_path|.
- typedef base::Callback<void(GDataFileError error,
- const FilePath& file_path)>
- FilePathUpdateCallback;
// Struct used for StartFileUploadOnUIThread().
struct StartFileUploadParams;
@@ -489,28 +485,32 @@
const std::string& md5);
// Renames a file or directory at |file_path| on in-memory snapshot
- // of the file system. Returns PLATFORM_FILE_OK if successful.
- GDataFileError RenameFileOnFilesystem(
- const FilePath& file_path, const FilePath::StringType& new_name,
- FilePath* updated_file_path);
+ // of the file system.
+ void RenameFileOnFilesystem(const FilePath& file_path,
+ const FilePath::StringType& new_name,
+ const FilePathUpdateCallback& callback);
- // Adds an |entry| to another directory at |dir_path| on in-memory snapshot
- // of the file system. Returns PLATFORM_FILE_OK if successful.
- GDataFileError AddEntryToDirectoryOnFilesystem(
- GDataEntry* entry, const FilePath& dir_path);
+ // Removes a file or directory at |file_path| and moves it to root on
+ // in-memory snapshot of the file system.
+ void RemoveEntryFromDirectoryOnFilesystem(
+ const FilePath& file_path,
+ const FilePathUpdateCallback& callback);
- // Removes a file or directory at |file_path| from another directory at
- // |dir_path| on in-memory snapshot of the file system.
- // Returns PLATFORM_FILE_OK if successful.
- GDataFileError RemoveEntryFromDirectoryOnFilesystem(
- const FilePath& file_path, const FilePath& dir_path,
- FilePath* updated_file_path);
-
// 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);
+ // Callback for GDataDirectoryService::AddEntryToDirectory.
+ void OnAddEntryToDirectory(const FilePathUpdateCallback& callback,
+ GDataFileError error,
+ const FilePath& updated_file_path);
+
+ // Callback for GDataDirectoryService::AddEntryToDirectory.
+ void OnAddEntryToDirectory2(const FileOperationCallback& callback,
satorux1 2012/08/08 16:04:10 This does not look like a good name. What about:
achuithb 2012/08/08 22:08:41 Thanks for the suggestion. I didn't have the coura
+ GDataFileError error,
+ const FilePath& updated_file_path);
+
// Callback for GetEntryByResourceIdAsync.
// Removes stale entry upon upload of file.
static void RemoveStaleEntryOnUpload(const std::string& resource_id,
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698