| Index: base/debug/trace_event.h
|
| diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h
|
| index 2fd03c9046d219d9d0f005aaaf3acf4c62d818c8..6d6d3e303cfc23739aa9c83e06514bec58cf945b 100644
|
| --- a/base/debug/trace_event.h
|
| +++ b/base/debug/trace_event.h
|
| @@ -195,6 +195,7 @@
|
| #include "base/debug/trace_event_impl.h"
|
| #include "base/debug/trace_event_memory.h"
|
| #include "base/debug/trace_event_system_stats_monitor.h"
|
| +#include "base/time/time.h"
|
| #include "build/build_config.h"
|
|
|
| // By default, const char* argument values are assumed to have long-lived scope
|
| @@ -1159,6 +1160,22 @@ static inline void SetTraceValue(const std::string& arg,
|
| *value = type_value.as_uint;
|
| }
|
|
|
| +// base::Time and base::TimeTicks version of SetTraceValue to make it easier to
|
| +// trace these types.
|
| +static inline void SetTraceValue(const base::Time arg,
|
| + unsigned char* type,
|
| + unsigned long long* value) {
|
| + *type = TRACE_VALUE_TYPE_INT;
|
| + *value = arg.ToInternalValue();
|
| +}
|
| +
|
| +static inline void SetTraceValue(const base::TimeTicks arg,
|
| + unsigned char* type,
|
| + unsigned long long* value) {
|
| + *type = TRACE_VALUE_TYPE_INT;
|
| + *value = arg.ToInternalValue();
|
| +}
|
| +
|
| // These AddTraceEvent and AddTraceEventWithThreadIdAndTimestamp template
|
| // functions are defined here instead of in the macro, because the arg_values
|
| // could be temporary objects, such as std::string. In order to store
|
|
|