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

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: fixed up and ready to go 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..fe40ef4aef63a4ca244db27277c2100a3623bb77 100644
--- a/chrome/browser/download/download_status_updater.cc
+++ b/chrome/browser/download/download_status_updater.cc
@@ -100,11 +100,31 @@ void DownloadStatusUpdater::UpdateItem(content::DownloadItem* download) {
if (!ContainsKey(items_, download)) {
items_.insert(download);
download->AddObserver(this);
+ UpdateDownloadProgressForItemAdded(download);
+ } else {
+ UpdateDownloadProgressForItemProgressed(download);
}
} else {
if (ContainsKey(items_, download)) {
+ UpdateDownloadProgressForItemRemoved(download);
items_.erase(download);
download->RemoveObserver(this);
}
}
}
+
+// Non-Mac platforms track overall download progress via
+// UpdateAppIconDownloadProgress().
+#if !defined(OS_MACOSX)
+void DownloadStatusUpdater::UpdateDownloadProgressForItemAdded(
+ content::DownloadItem* download) {
+}
+
+void DownloadStatusUpdater::UpdateDownloadProgressForItemProgressed(
+ content::DownloadItem* download) {
+}
+
+void DownloadStatusUpdater::UpdateDownloadProgressForItemRemoved(
+ content::DownloadItem* download) {
+}
+#endif // OS_MACOSX

Powered by Google App Engine
This is Rietveld 408576698