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

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: Restored curlies to original. 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
« no previous file with comments | « chrome/browser/chromeos/imageburner/burn_manager.cc ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2e7728f8bfa0d0a98a30d950f1b82280dfe5e496 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(
@@ -40,6 +41,12 @@ void DownloadResourceThrottle::WillReadRequest(bool* defer) {
void DownloadResourceThrottle::ContinueDownload(bool allow) {
request_allowed_ = allow;
+ if (allow) {
+ download_util::RecordDownloadSource(
darin (slow to review) 2012/02/10 23:47:28 nit: indentation You are counting on the fact tha
Randy Smith (Not in Mondays) 2012/02/12 19:19:00 Done.
+ download_util::INITIATED_BY_NAVIGATION);
+ } else {
+ download_util::RecordDownloadCount(download_util::BLOCKED_BY_THROTTLING);
+ }
if (request_deferred_) {
if (allow) {
« no previous file with comments | « chrome/browser/chromeos/imageburner/burn_manager.cc ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698