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

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

Issue 7664019: Move download UMA functions to their own file in content. Also fire the chrome-only notification ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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: content/browser/download/download_item.cc
===================================================================
--- content/browser/download/download_item.cc (revision 96993)
+++ content/browser/download/download_item.cc (working copy)
@@ -32,6 +32,7 @@
#include "content/browser/download/download_create_info.h"
#include "content/browser/download/download_file_manager.h"
#include "content/browser/download/download_manager.h"
+#include "content/browser/download/download_stats.h"
#include "content/common/notification_source.h"
// A DownloadItem normally goes through the following states:
@@ -387,7 +388,7 @@
return;
}
- download_util::RecordDownloadCount(download_util::CANCELLED_COUNT);
+ download_stats::RecordDownloadCount(download_stats::CANCELLED_COUNT);
TransitionTo(CANCELLED);
StopProgressTimer();
@@ -427,7 +428,7 @@
DCHECK(all_data_saved_);
TransitionTo(COMPLETE);
download_manager_->DownloadCompleted(id());
- download_util::RecordDownloadCompleted(start_tick_);
+ download_stats::RecordDownloadCompleted(start_tick_);
if (is_extension_install()) {
// Extensions should already have been unpacked and opened.
@@ -527,9 +528,9 @@
last_os_error_ = os_error;
UpdateSize(size);
StopProgressTimer();
- download_util::RecordDownloadInterrupted(os_error,
- received_bytes_,
- total_bytes_);
+ download_stats::RecordDownloadInterrupted(os_error,
+ received_bytes_,
+ total_bytes_);
TransitionTo(INTERRUPTED);
}
@@ -779,7 +780,7 @@
UpdateTarget();
if (active) {
StartProgressTimer();
- download_util::RecordDownloadCount(download_util::START_COUNT);
+ download_stats::RecordDownloadCount(download_stats::START_COUNT);
}
VLOG(20) << __FUNCTION__ << "() " << DebugString(true);
}

Powered by Google App Engine
This is Rietveld 408576698