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

Unified Diff: content/child/notifications/pending_notification.cc

Issue 1715763002: Add histograms for notification icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NotificationIconScaling
Patch Set: Rebase. Created 4 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/child/notifications/notification_image_loader.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/notifications/pending_notification.cc
diff --git a/content/child/notifications/pending_notification.cc b/content/child/notifications/pending_notification.cc
index 60d4b2b474b670f7baf9b2c87d7f13e025e651f0..cc6542e6eeb1f8666bcd03b8e10d862e074400e8 100644
--- a/content/child/notifications/pending_notification.cc
+++ b/content/child/notifications/pending_notification.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
+#include "base/metrics/histogram_macros.h"
#include "base/thread_task_runner_handle.h"
#include "content/common/notification_constants.h"
#include "content/public/common/notification_resources.h"
@@ -25,6 +26,7 @@ namespace {
// returns |icon| unchanged.
SkBitmap ScaleDownIfNeeded(const SkBitmap& icon, int max_size_px) {
if (icon.width() > max_size_px || icon.height() > max_size_px) {
+ SCOPED_UMA_HISTOGRAM_TIMER("Notifications.Icon.ScaleDownTime");
return skia::ImageOperations::Resize(icon,
skia::ImageOperations::RESIZE_BEST,
std::min(icon.width(), max_size_px),
« no previous file with comments | « content/child/notifications/notification_image_loader.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698