OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/renderer/pepper/pepper_plugin_instance_metrics.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_metrics.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
8 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
| 11 #include "build/build_config.h" |
9 #include "ppapi/shared_impl/ppapi_preferences.h" | 12 #include "ppapi/shared_impl/ppapi_preferences.h" |
10 | 13 |
11 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
12 #include "base/win/windows_version.h" | 15 #include "base/win/windows_version.h" |
13 #endif | 16 #endif |
14 | 17 |
15 #define UMA_HISTOGRAM_ASPECT_RATIO(name, width, height) \ | 18 #define UMA_HISTOGRAM_ASPECT_RATIO(name, width, height) \ |
16 UMA_HISTOGRAM_SPARSE_SLOWLY( \ | 19 UMA_HISTOGRAM_SPARSE_SLOWLY( \ |
17 name, (height) ? ((width)*100) / (height) : kInfiniteRatio); | 20 name, (height) ? ((width)*100) / (height) : kInfiniteRatio); |
18 | 21 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // 4 : No 3D content and GPU is blacklisted on XP | 102 // 4 : No 3D content and GPU is blacklisted on XP |
100 // 5 : No 3D content and GPU is not blacklisted on XP | 103 // 5 : No 3D content and GPU is not blacklisted on XP |
101 // 6 : 3D content but GPU is blacklisted on XP | 104 // 6 : 3D content but GPU is blacklisted on XP |
102 // 7 : 3D content and GPU is not blacklisted on XP | 105 // 7 : 3D content and GPU is not blacklisted on XP |
103 UMA_HISTOGRAM_ENUMERATION( | 106 UMA_HISTOGRAM_ENUMERATION( |
104 "Flash.UsesGPU", is_xp * 4 + needs_gpu * 2 + prefs.is_webgl_supported, 8); | 107 "Flash.UsesGPU", is_xp * 4 + needs_gpu * 2 + prefs.is_webgl_supported, 8); |
105 #endif | 108 #endif |
106 } | 109 } |
107 | 110 |
108 } // namespace content | 111 } // namespace content |
OLD | NEW |