OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/debug/trace_event.h" | |
6 #include "base/json/json_writer.h" | 5 #include "base/json/json_writer.h" |
7 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/trace_event/trace_event.h" |
9 #include "ui/events/latency_info.h" | 9 #include "ui/events/latency_info.h" |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const size_t kMaxLatencyInfoNumber = 100; | 15 const size_t kMaxLatencyInfoNumber = 100; |
16 | 16 |
17 const char* GetComponentName(ui::LatencyComponentType type) { | 17 const char* GetComponentName(ui::LatencyComponentType type) { |
18 #define CASE_TYPE(t) case ui::t: return #t | 18 #define CASE_TYPE(t) case ui::t: return #t |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 322 } |
323 | 323 |
324 void LatencyInfo::TraceEventType(const char* event_type) { | 324 void LatencyInfo::TraceEventType(const char* event_type) { |
325 TRACE_EVENT_ASYNC_STEP_INTO0("benchmark", | 325 TRACE_EVENT_ASYNC_STEP_INTO0("benchmark", |
326 "InputLatency", | 326 "InputLatency", |
327 TRACE_ID_DONT_MANGLE(trace_id), | 327 TRACE_ID_DONT_MANGLE(trace_id), |
328 event_type); | 328 event_type); |
329 } | 329 } |
330 | 330 |
331 } // namespace ui | 331 } // namespace ui |
OLD | NEW |