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

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

Issue 9844006: GData downloads cleanup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: asanka review feedback Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_download_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_download_observer.h
===================================================================
--- chrome/browser/chromeos/gdata/gdata_download_observer.h (revision 129387)
+++ chrome/browser/chromeos/gdata/gdata_download_observer.h (working copy)
@@ -29,9 +29,9 @@
virtual ~GDataDownloadObserver();
// Become an observer of DownloadManager.
- void Initialize(const FilePath& temp_download_path,
- GDataUploader* gdata_uploader,
- content::DownloadManager* download_manager);
+ void Initialize(GDataUploader* gdata_uploader,
+ content::DownloadManager* download_manager,
+ const FilePath& gdata_tmp_download_path);
// Sets gdata path, for example, '/special/gdata/MyFolder/MyFile',
// to external data in |download|.
@@ -93,14 +93,16 @@
bool ShouldUpload(content::DownloadItem* download);
// Creates UploadFileInfo and initializes it using DownloadItem*.
- UploadFileInfo* CreateUploadFileInfo(content::DownloadItem* download);
+ scoped_ptr<UploadFileInfo> CreateUploadFileInfo(
+ content::DownloadItem* download);
// 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.
- void OnUploadComplete(int32 download_id, base::PlatformFileError error,
- DocumentEntry* unused_entry);
+ void OnUploadComplete(int32 download_id,
+ base::PlatformFileError error,
+ UploadFileInfo* upload_file_info);
// Private data.
// Use GDataUploader to trigger file uploads.
@@ -108,14 +110,15 @@
// Observe the DownloadManager for new downloads.
content::DownloadManager* download_manager_;
+ // Temporary download location directory.
+ FilePath gdata_tmp_download_path_;
+
+ // Map of pending downloads.
typedef std::map<int32, content::DownloadItem*> DownloadMap;
DownloadMap pending_downloads_;
base::WeakPtrFactory<GDataDownloadObserver> weak_ptr_factory_;
- // Temporary download location directory.
- FilePath temp_download_path_;
-
DISALLOW_COPY_AND_ASSIGN(GDataDownloadObserver);
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_download_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698