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

Unified Diff: chrome/browser/download/download_status_updater.cc

Issue 10827207: Mountain Lion: use the system download progress. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 4 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
Index: chrome/browser/download/download_status_updater.cc
diff --git a/chrome/browser/download/download_status_updater.cc b/chrome/browser/download/download_status_updater.cc
index 817e4184268926339bd599dc431f2ca5429911e2..9cebbb03319972f0654237560e1ad515e0a0c456 100644
--- a/chrome/browser/download/download_status_updater.cc
+++ b/chrome/browser/download/download_status_updater.cc
@@ -100,11 +100,32 @@ void DownloadStatusUpdater::UpdateItem(content::DownloadItem* download) {
if (!ContainsKey(items_, download)) {
items_.insert(download);
download->AddObserver(this);
+ UpdateDownloadProgressForItemStarted(download);
+ } else {
+ UpdateDownloadProgressForItemProgressed(download);
}
} else {
if (ContainsKey(items_, download)) {
+ UpdateDownloadProgressForItemCompleted(download);
items_.erase(download);
download->RemoveObserver(this);
}
}
}
+
+// All platforms track overall download progress via
+// UpdateAppIconDownloadProgress(); these allow for tracking the progress of
+// individual downloads.
+#if !defined(OS_MACOSX) && !defined(OS_WIN)
+void DownloadStatusUpdater::UpdateDownloadProgressForItemStarted(
+ content::DownloadItem* download) {
+}
+
+void DownloadStatusUpdater::UpdateDownloadProgressForItemProgressed(
+ content::DownloadItem* download) {
+}
+
+void DownloadStatusUpdater::UpdateDownloadProgressForItemCompleted(
+ content::DownloadItem* download) {
+}
+#endif // OS_MACOSX

Powered by Google App Engine
This is Rietveld 408576698