| 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..76374e267f7d53cf03e8ab11c27d44a3b55b5158 100644
|
| --- a/chrome/browser/chromeos/gdata/gdata_file_system.h
|
| +++ b/chrome/browser/chromeos/gdata/gdata_file_system.h
|
| @@ -372,11 +372,13 @@ 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;
|
| + //
|
| + // |callback| will be called on the UI thread upon completion of operation.
|
| + 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 +460,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 +999,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 +1423,11 @@ class GDataFileSystem : public GDataFileSystemInterface,
|
| void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback);
|
| void SetPinStateOnUIThread(const FilePath& file_path, bool to_pin,
|
| const FileOperationCallback& 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_;
|
|
|
|
|