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

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: Merged to LKGR. 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 | « content/browser/renderer_host/render_message_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aaacf1b106787c3094948bee4aaa90a9cce32459..bbc41e87a9389346e805d1fdea68e902544df0f1 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1093,9 +1093,9 @@ bool TabContents::IsSavable() {
void TabContents::OnSavePage() {
// If we can not save the page, try to download it.
if (!IsSavable()) {
+ download_stats::RecordDownloadSource(
+ download_stats::INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML);
SaveURL(GetURL(), GURL(), true);
- download_stats::RecordDownloadCount(
- download_stats::INITIATED_BY_SAVE_PACKAGE_FAILURE_COUNT);
return;
}
@@ -1571,6 +1571,8 @@ void TabContents::OnUpdateZoomLimits(int minimum_percent,
}
void TabContents::OnSaveURL(const GURL& url) {
+ download_stats::RecordDownloadSource(
+ download_stats::INITIATED_BY_PEPPER_SAVE);
// Check if the URL to save matches the URL of the main frame. Since this
// message originates from Pepper plugins, it may not be the case if the
// plugin is an embedded element.
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698