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

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

Issue 9316116: Isolate initiation counts for downloads to their own histograms and improve (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to TOT. Created 8 years, 10 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_resource_throttle.cc
diff --git a/chrome/browser/download/download_resource_throttle.cc b/chrome/browser/download/download_resource_throttle.cc
index 87d41dc7939feb8e815e525c660bc0e22139db90..d6f9940d3f81fac3f6ff2d43609180fd2f12a8e6 100644
--- a/chrome/browser/download/download_resource_throttle.cc
+++ b/chrome/browser/download/download_resource_throttle.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/download/download_resource_throttle.h"
#include "base/bind.h"
+#include "chrome/browser/download/download_util.h"
#include "content/public/browser/resource_throttle_controller.h"
DownloadResourceThrottle::DownloadResourceThrottle(
@@ -43,8 +44,11 @@ void DownloadResourceThrottle::ContinueDownload(bool allow) {
if (request_deferred_) {
if (allow) {
+ download_util::RecordDownloadSource(
+ download_util::INITIATED_BY_NAVIGATION);
controller()->Resume();
} else {
+ download_util::RecordDownloadCount(download_util::BLOCKED_BY_THROTTLING);
controller()->Cancel();
}
}

Powered by Google App Engine
This is Rietveld 408576698