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

Unified Diff: content/browser/tab_contents/tab_contents.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: Shift recording of UMA to before initiation in all cases. 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: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 1fc4bfafe34850528a930836d3c77b2f160f64f0..66189414d3e39c2c8c8d22f3a25b160a0339c159 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -939,14 +939,14 @@ void TabContents::OnSavePage() {
if (dlm && current_page_url.is_valid()) {
DownloadSaveInfo save_info;
save_info.prompt_for_save_location = true;
+ download_stats::RecordDownloadSource(
+ download_stats::INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML);
dlm->DownloadUrl(current_page_url,
GURL(),
"",
true, // prefer_cache
save_info,
this);
- download_stats::RecordDownloadCount(
- download_stats::INITIATED_BY_SAVE_PACKAGE_FAILURE_COUNT);
return;
}
}
@@ -1425,6 +1425,8 @@ void TabContents::OnUpdateZoomLimits(int minimum_percent,
}
void TabContents::OnSaveURL(const GURL& url) {
+ download_stats::RecordDownloadSource(
+ download_stats::INITIATED_BY_RENDERER_SAVE);
DownloadManager* dlm = GetBrowserContext()->GetDownloadManager();
DownloadSaveInfo save_info;
save_info.prompt_for_save_location = true;

Powered by Google App Engine
This is Rietveld 408576698