| Index: third_party/WebKit/Source/platform/scheduler/base/trace_helper.cc
|
| diff --git a/third_party/WebKit/Source/platform/scheduler/base/trace_helper.cc b/third_party/WebKit/Source/platform/scheduler/base/trace_helper.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bd8ba1524fb1d6d9c6a6fc4aaf9865d36b750f17
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/scheduler/base/trace_helper.cc
|
| @@ -0,0 +1,22 @@
|
| +// 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.
|
| +
|
| +#include "platform/scheduler/base/trace_helper.h"
|
| +
|
| +#include "base/format_macros.h"
|
| +#include "base/strings/stringprintf.h"
|
| +
|
| +namespace blink {
|
| +namespace scheduler {
|
| +
|
| +std::string TraceHelper::PointerToString(const void* pointer,
|
| + bool add_hex_prefix) {
|
| + const char* format_string = add_hex_prefix ? "0x%" PRIx64 : "%" PRIx64;
|
| + return base::StringPrintf(
|
| + format_string,
|
| + static_cast<uint64_t>(reinterpret_cast<uintptr_t>(pointer)));
|
| +}
|
| +
|
| +} // namespace scheduler
|
| +} // namespace blink
|
|
|