Index: components/favicon/core/large_icon_service.cc |
diff --git a/components/favicon/core/large_icon_service.cc b/components/favicon/core/large_icon_service.cc |
index e44e5c7d8e189a020004a5bed931b19259677702..616cfd056c7368fd6252e750231178c3f30975a3 100644 |
--- a/components/favicon/core/large_icon_service.cc |
+++ b/components/favicon/core/large_icon_service.cc |
@@ -12,6 +12,7 @@ |
#include "base/macros.h" |
#include "base/memory/ptr_util.h" |
#include "base/memory/ref_counted.h" |
+#include "base/metrics/histogram_macros.h" |
#include "base/strings/stringprintf.h" |
#include "base/task_runner.h" |
#include "base/threading/sequenced_worker_pool.h" |
@@ -228,9 +229,13 @@ void OnFetchIconFromGoogleServerComplete( |
favicon_service->UnableToDownloadFavicon(GURL(icon_url)); |
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
base::Bind(callback, false)); |
+ UMA_HISTOGRAM_COUNTS_1000("Favicons.LargeIconService.DownloadedSize", 0); |
return; |
} |
+ UMA_HISTOGRAM_COUNTS_1000("Favicons.LargeIconService.DownloadedSize", |
+ image.Width()); |
Ilya Sherman
2017/04/07 19:26:47
nit: Histogram macros expand to a fair bit of code
jkrcal
2017/04/11 19:25:37
Done.
|
+ |
// TODO(crbug.com/699542): Extract the original icon url from the response |
// headers if available and use it instead of |icon_url|. Possibly the type |
// too, because using TOUCH_ICON is a hacky way that allows us to not |