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

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: 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
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 7f3e02cd795904a3d9b4001d808b15701969db68..2f8e22e4c7cd324a6975167d6d5a8f6d95fc3ab4 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1101,9 +1101,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;
}
@@ -1581,6 +1581,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.

Powered by Google App Engine
This is Rietveld 408576698