Index: chrome/browser/chromeos/gdata/gdata_download_observer.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.h b/chrome/browser/chromeos/gdata/gdata_download_observer.h |
index 576cbc93a69781cbe534edf65f225f4b1acbec86..fb9b1ef4ff8282d0279c82c99c1ddc905fdf7d55 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_download_observer.h |
+++ b/chrome/browser/chromeos/gdata/gdata_download_observer.h |
@@ -19,6 +19,7 @@ class Profile; |
namespace gdata { |
class DocumentEntry; |
+class GDataFileSystem; |
class GDataUploader; |
struct UploadFileInfo; |
@@ -27,12 +28,11 @@ struct UploadFileInfo; |
class GDataDownloadObserver : public content::DownloadManager::Observer, |
public content::DownloadItem::Observer { |
public: |
- GDataDownloadObserver(); |
+ GDataDownloadObserver(GDataUploader* uploader, GDataFileSystem* file_system); |
virtual ~GDataDownloadObserver(); |
// Become an observer of DownloadManager. |
- void Initialize(GDataUploader* gdata_uploader, |
- content::DownloadManager* download_manager, |
+ void Initialize(content::DownloadManager* download_manager, |
const FilePath& gdata_tmp_download_path); |
typedef base::Callback<void(const FilePath&)> |
@@ -115,14 +115,21 @@ class GDataDownloadObserver : public content::DownloadManager::Observer, |
// Callback invoked by GDataUploader when the upload associated with |
// |download_id| has completed. |error| indicated whether the |
// call was successful. This function invokes the MaybeCompleteDownload() |
- // method on the DownloadItem to allow it to complete. |
+ // method on the DownloadItem to allow it to complete. It also sets external |
+ // data struct GDataCacheExternalData for use by MoveDownloadedFileToCache(). |
void OnUploadComplete(int32 download_id, |
base::PlatformFileError error, |
scoped_ptr<UploadFileInfo> upload_file_info); |
+ // Moves the downloaded file to gdata cache. |
+ // Must be called after GDataDownloadObserver receives COMPLETE notification. |
+ void MoveDownloadedFileToCache(content::DownloadItem* download); |
achuithb
2012/07/10 23:04:35
Do you like this name? I feel like 'Downloaded' is
hshi1
2012/07/10 23:46:57
Makes sense, done.
|
+ |
// Private data. |
- // Use GDataUploader to trigger file uploads. |
+ // The uploader owned by GDataSystemService. Used to trigger file uploads. |
GDataUploader* gdata_uploader_; |
+ // The file system owned by GDataSystemService. |
+ GDataFileSystem* file_system_; |
// Observe the DownloadManager for new downloads. |
content::DownloadManager* download_manager_; |