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

Side by Side Diff: third_party/WebKit/Source/platform/TraceEvent.h

Issue 2391383002: Moving platform tracing things into platform/tracing. (Closed)
Patch Set: Created 4 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef TraceEvent_h
6 #define TraceEvent_h
7
8 #include "base/time/time.h"
9 #include "base/trace_event/trace_event.h"
10 #include "wtf/text/CString.h"
11
12 namespace WTF {
13
14 // CString version of SetTraceValue so that trace arguments can be strings.
15 static inline void SetTraceValue(const CString& arg,
16 unsigned char* type,
17 unsigned long long* value) {
18 trace_event_internal::TraceValueUnion typeValue;
19 typeValue.as_string = arg.data();
20 *type = TRACE_VALUE_TYPE_COPY_STRING;
21 *value = typeValue.as_uint;
22 }
23
24 } // namespace WTF
25
26 namespace blink {
27 namespace TraceEvent {
28
29 using base::trace_event::TraceScopedTrackableObject;
30
31 inline base::TimeTicks toTraceTimestamp(double seconds) {
32 return base::TimeTicks() + base::TimeDelta::FromSecondsD(seconds);
33 }
34
35 // This is to avoid error of passing a chromium time internal value.
36 void toTraceTimestamp(int64_t);
37
38 } // namespace TraceEvent
39 } // namespace blink
40
41 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/Timer.cpp ('k') | third_party/WebKit/Source/platform/TracedValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698