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 65a05d32e40dea50ac763986530b344132cf68ba..7959132af30e0051c18a669cedac30623332d666 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h |
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h |
@@ -372,11 +372,14 @@ class GDataFileSystemInterface { |
// Creates a new file from |entry| under |virtual_dir_path|. Stored its |
// content from |file_content_path| into the cache. |
- virtual void AddUploadedFile( |
- const FilePath& virtual_dir_path, |
- DocumentEntry* entry, |
- const FilePath& file_content_path, |
- GDataCache::FileOperationType cache_operation) = 0; |
+ // |
+ // Must be run on the UI thread. |callback| will be run on the thread this |
+ // function is called. |
satorux1
2012/06/14 20:30:06
maybe:
|callback| will be called on the UI thread
hshi1
2012/06/14 20:47:27
Done. Yes the only thing callback does is to delet
|
+ virtual void AddUploadedFile(const FilePath& virtual_dir_path, |
+ DocumentEntry* entry, |
+ const FilePath& file_content_path, |
+ GDataCache::FileOperationType cache_operation, |
+ const base::Closure& callback) = 0; |
// Returns true if hosted documents should be hidden. |
virtual bool hide_hosted_documents() = 0; |
@@ -458,11 +461,11 @@ class GDataFileSystem : public GDataFileSystemInterface, |
// Calls private Pin or Unpin methods with |callback|. |
virtual void SetPinState(const FilePath& file_path, bool pin, |
const FileOperationCallback& callback) OVERRIDE; |
- virtual void AddUploadedFile( |
- const FilePath& virtual_dir_path, |
- DocumentEntry* entry, |
- const FilePath& file_content_path, |
- GDataCache::FileOperationType cache_operation) OVERRIDE; |
+ virtual void AddUploadedFile(const FilePath& virtual_dir_path, |
+ DocumentEntry* entry, |
+ const FilePath& file_content_path, |
+ GDataCache::FileOperationType cache_operation, |
+ const base::Closure& callback) OVERRIDE; |
virtual bool hide_hosted_documents() OVERRIDE; |
// content::NotificationObserver implementation. |
@@ -997,6 +1000,13 @@ class GDataFileSystem : public GDataFileSystemInterface, |
base::PlatformFileError error, |
UploadFileInfo* upload_file_info); |
+ // Helper function called upon completion of AddUploadFile invoked by |
+ // OnTransferCompleted. |
+ void OnAddUploadFileCompleted( |
+ const FileOperationCallback& callback, |
+ base::PlatformFileError error, |
+ UploadFileInfo* upload_file_info); |
+ |
// Kicks off file upload once it receives |upload_file_info|. |
void StartFileUploadOnUIThread( |
const FileOperationCallback& callback, |
@@ -1414,6 +1424,15 @@ class GDataFileSystem : public GDataFileSystemInterface, |
void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); |
void SetPinStateOnUIThread(const FilePath& file_path, bool to_pin, |
const FileOperationCallback& callback); |
+ void SetMountedStateOnUIThread( |
+ const FilePath& file_path, |
+ bool to_mount, |
+ const SetMountedStateCallback& callback); |
+ void AddUploadedFileOnUIThread(const FilePath& virtual_dir_path, |
+ DocumentEntry* entry, |
+ const FilePath& file_content_path, |
+ GDataCache::FileOperationType cache_operation, |
+ const base::Closure& callback); |
scoped_ptr<GDataRootDirectory> root_; |