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

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

Issue 10263019: DownloadManagerDelegate::ShouldCompleteDownload(callback) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments Created 8 years, 8 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
diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.h b/chrome/browser/chromeos/gdata/gdata_download_observer.h
index 3701c7201781d855b855b5a3160997917e67e54c..250694ec8f88732f21d99bbff75ec30799255cbd 100644
--- a/chrome/browser/chromeos/gdata/gdata_download_observer.h
+++ b/chrome/browser/chromeos/gdata/gdata_download_observer.h
@@ -44,8 +44,15 @@ class GDataDownloadObserver : public content::DownloadManager::Observer,
// Checks if |download| is ready to complete. Returns true if |download| has
// no GData upload associated with it or if the GData upload has already
// completed. This method is called by the ChromeDownloadManagerDelegate to
- // check if the download is ready to complete.
- static bool IsReadyToComplete(content::DownloadItem* download);
+ // check if the download is ready to complete. If the download is not yet
+ // ready to complete and |maybe_complete_download| is not null, then
+ // |maybe_complete_download| will be called on the UI thread when the download
+ // becomes ready to complete. If you aren't careful to avoid setting
Randy Smith (Not in Mondays) 2012/05/01 18:21:49 I'd actually just say "If this call is made multip
benjhayden 2012/05/01 19:00:30 Done.
+ // |maybe_complete_download| twice, then the last one wins. You can't unset
+ // it once you set it.
+ static bool IsReadyToComplete(
+ content::DownloadItem* download,
+ const base::Closure& maybe_complete_download);
// Returns the count of bytes confirmed as uploaded so far for |download|.
static int64 GetUploadedBytes(content::DownloadItem* download);
« 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