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

Unified Diff: components/favicon/core/favicon_handler.cc

Issue 2808063002: Add DownloadStatus metric to FaviconHandler (Closed)
Patch Set: Rename histogram enum descriptions Created 3 years, 8 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: components/favicon/core/favicon_handler.cc
diff --git a/components/favicon/core/favicon_handler.cc b/components/favicon/core/favicon_handler.cc
index bc8aa18d611ad2ece93792415395d9d0f604f34a..eb69b6da149b2f34a9423e80ba4b97cc902a166b 100644
--- a/components/favicon/core/favicon_handler.cc
+++ b/components/favicon/core/favicon_handler.cc
@@ -375,8 +375,13 @@ void FaviconHandler::OnDidDownloadFavicon(
if (bitmaps.empty() && http_status_code == 404) {
DVLOG(1) << "Failed to Download Favicon:" << image_url;
+ UMA_HISTOGRAM_COUNTS_100("Favicons.DownloadOutcome",
+ DownloadOutcome::FAILED);
if (service_)
service_->UnableToDownloadFavicon(image_url);
+ } else if (http_status_code == 200) {
pkotwicz 2017/04/10 18:30:59 Can we record this whenever !bitmaps.empty()
fhorschig 2017/04/11 12:24:53 Done.
+ UMA_HISTOGRAM_COUNTS_100("Favicons.DownloadOutcome",
+ DownloadOutcome::SUCCEEDED);
}
bool request_next_icon = true;
@@ -545,6 +550,8 @@ void FaviconHandler::ScheduleDownload(const GURL& image_url,
DCHECK(download_request_.IsCancelled()) << "More than one ongoing download";
if (service_ && service_->WasUnableToDownloadFavicon(image_url)) {
DVLOG(1) << "Skip Failed FavIcon: " << image_url;
+ UMA_HISTOGRAM_COUNTS_100("Favicons.DownloadOutcome",
+ DownloadOutcome::SKIPPED);
OnDidDownloadFavicon(icon_type, 0, 0, image_url, std::vector<SkBitmap>(),
std::vector<gfx::Size>());
return;

Powered by Google App Engine
This is Rietveld 408576698