mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-02-26 03:43:19 +03:00
20 lines
554 B
C++
20 lines
554 B
C++
|
// Copyright 2019 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 "base/profiler/sampling_profiler_thread_token.h"
|
||
|
|
||
|
#include "build/build_config.h"
|
||
|
|
||
|
namespace base {
|
||
|
|
||
|
SamplingProfilerThreadToken GetSamplingProfilerCurrentThreadToken() {
|
||
|
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||
|
return {PlatformThread::CurrentId(), pthread_self()};
|
||
|
#else
|
||
|
return {PlatformThread::CurrentId()};
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
} // namespace base
|