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

Side by Side Diff: third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/notifications/NotificationImageLoader.h" 5 #include "modules/notifications/NotificationImageLoader.h"
6 6
7 #include <memory>
7 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
8 #include "platform/Histogram.h" 9 #include "platform/Histogram.h"
9 #include "platform/image-decoders/ImageDecoder.h" 10 #include "platform/image-decoders/ImageDecoder.h"
10 #include "platform/image-decoders/ImageFrame.h" 11 #include "platform/image-decoders/ImageFrame.h"
11 #include "platform/loader/fetch/ResourceLoaderOptions.h" 12 #include "platform/loader/fetch/ResourceLoaderOptions.h"
12 #include "platform/network/ResourceError.h" 13 #include "platform/network/ResourceError.h"
13 #include "platform/network/ResourceLoadPriority.h" 14 #include "platform/network/ResourceLoadPriority.h"
14 #include "platform/network/ResourceRequest.h" 15 #include "platform/network/ResourceRequest.h"
15 #include "platform/weborigin/KURL.h" 16 #include "platform/weborigin/KURL.h"
16 #include "public/platform/WebURLRequest.h" 17 #include "public/platform/WebURLRequest.h"
17 #include "public/platform/modules/notifications/WebNotificationConstants.h" 18 #include "public/platform/modules/notifications/WebNotificationConstants.h"
18 #include "skia/ext/image_operations.h" 19 #include "skia/ext/image_operations.h"
19 #include "wtf/CurrentTime.h" 20 #include "wtf/CurrentTime.h"
20 #include "wtf/Threading.h" 21 #include "wtf/Threading.h"
21 #include <memory>
22 22
23 #define NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, type_name, value, max) \ 23 #define NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, type_name, value, max) \
24 case NotificationImageLoader::Type::type_name: { \ 24 case NotificationImageLoader::Type::type_name: { \
25 DEFINE_THREAD_SAFE_STATIC_LOCAL( \ 25 DEFINE_THREAD_SAFE_STATIC_LOCAL( \
26 CustomCountHistogram, metric##type_name##Histogram, \ 26 CustomCountHistogram, metric##type_name##Histogram, \
27 new CustomCountHistogram("Notifications." #metric "." #type_name, \ 27 new CustomCountHistogram("Notifications." #metric "." #type_name, \
28 1 /* min */, max, 50 /* buckets */)); \ 28 1 /* min */, max, 50 /* buckets */)); \
29 metric##type_name##Histogram.count(value); \ 29 metric##type_name##Histogram.count(value); \
30 break; \ 30 break; \
31 } 31 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 void NotificationImageLoader::runCallbackWithEmptyBitmap() { 188 void NotificationImageLoader::runCallbackWithEmptyBitmap() {
189 // If this has been stopped it is not desirable to trigger further work, 189 // If this has been stopped it is not desirable to trigger further work,
190 // there is a shutdown of some sort in progress. 190 // there is a shutdown of some sort in progress.
191 if (m_stopped) 191 if (m_stopped)
192 return; 192 return;
193 193
194 (*m_imageCallback)(SkBitmap()); 194 (*m_imageCallback)(SkBitmap());
195 } 195 }
196 196
197 } // namespace blink 197 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698