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

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

Issue 8381009: Const-ify DownloadStatusUpdaterDelegate methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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: content/browser/download/download_status_updater.cc
diff --git a/content/browser/download/download_status_updater.cc b/content/browser/download/download_status_updater.cc
index 5d3a11c83d212e6c84e181649039e6d02b133911..5ab65ad187d12c56d3f3bb43ef1fb299b4d7ca0b 100644
--- a/content/browser/download/download_status_updater.cc
+++ b/content/browser/download/download_status_updater.cc
@@ -24,13 +24,13 @@ void DownloadStatusUpdater::RemoveDelegate(
}
bool DownloadStatusUpdater::GetProgress(float* progress,
- int* download_count) {
+ int* download_count) const {
*progress = 0;
*download_count = GetInProgressDownloadCount();
int64 received_bytes = 0;
int64 total_bytes = 0;
- for (DelegateSet::iterator i = delegates_.begin();
+ for (DelegateSet::const_iterator i = delegates_.begin();
i != delegates_.end(); ++i) {
if (!(*i)->IsDownloadProgressKnown())
return false;
@@ -43,9 +43,9 @@ bool DownloadStatusUpdater::GetProgress(float* progress,
return true;
}
-int64 DownloadStatusUpdater::GetInProgressDownloadCount() {
+int64 DownloadStatusUpdater::GetInProgressDownloadCount() const {
int64 download_count = 0;
- for (DelegateSet::iterator i = delegates_.begin();
+ for (DelegateSet::const_iterator i = delegates_.begin();
i != delegates_.end(); ++i) {
download_count += (*i)->GetInProgressDownloadCount();
}
« no previous file with comments | « content/browser/download/download_status_updater.h ('k') | content/browser/download/download_status_updater_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698