| Index: third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp
|
| diff --git a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp
|
| index 0b6ce6578bcfdc7487465cdff1e2b55845f56f60..5759e503464272c2136389c69fd7f7d3bfabd905 100644
|
| --- a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp
|
| +++ b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp
|
| @@ -12,6 +12,7 @@
|
| #include "skia/ext/image_operations.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "wtf/CurrentTime.h"
|
| +#include "wtf/Threading.h"
|
|
|
| namespace blink {
|
|
|
| @@ -24,7 +25,7 @@ namespace {
|
| SkBitmap scaleDownIfNeeded(const SkBitmap& image, int maxSizePx)
|
| {
|
| if (image.width() > maxSizePx || image.height() > maxSizePx) {
|
| - DEFINE_STATIC_LOCAL(CustomCountHistogram, scaleTimeHistogram, ("Notifications.Icon.ScaleDownTime", 1, 1000 * 10 /* 10 seconds max */, 50 /* buckets */));
|
| + DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scaleTimeHistogram, new CustomCountHistogram("Notifications.Icon.ScaleDownTime", 1, 1000 * 10 /* 10 seconds max */, 50 /* buckets */));
|
| double startTime = monotonicallyIncreasingTimeMS();
|
| SkBitmap scaledImage = skia::ImageOperations::Resize(image, skia::ImageOperations::RESIZE_BEST, std::min(image.width(), maxSizePx), std::min(image.height(), maxSizePx));
|
| scaleTimeHistogram.count(monotonicallyIncreasingTimeMS() - startTime);
|
|
|