Chromium Code Reviews| Index: ui/compositor/animation_metrics_reporter_template.h |
| diff --git a/ui/compositor/animation_metrics_reporter_template.h b/ui/compositor/animation_metrics_reporter_template.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1f3224970c7efcc98d84a44ea316c6c869e91c08 |
| --- /dev/null |
| +++ b/ui/compositor/animation_metrics_reporter_template.h |
| @@ -0,0 +1,20 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_ANIMATION_METRICS_REPORTER_TEMPLATE_H_ |
| +#define UI_ANIMATION_METRICS_REPORTER_TEMPLATE_H_ |
| + |
| +#include "base/metrics/histogram_macros.h" |
| +#include "ui/compositor/layer_animation_element.h" |
| + |
| +namespace ui { |
| + |
| +template <const char* name> |
| +class AnimationMetricsReporterTemplate : public AnimationMetricsReporter { |
| + void Report(int value) override { UMA_HISTOGRAM_PERCENTAGE(name, value); } |
|
rkaplow
2017/01/23 15:47:18
you can't use the macros this way: https://codesea
varkha
2017/01/24 00:18:57
The intention here was exactly to make the strings
|
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_ANIMATION_METRICS_REPORTER_TEMPLATE_H_ |