diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-31 15:50:41 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:35:23 +0000 |
commit | 7b2ffa587235a47d4094787d72f38102089f402a (patch) | |
tree | 30e82af9cbab08a7fa028bb18f4f2987a3f74dfa /chromium/components/tracing | |
parent | d94af01c90575348c4e81a418257f254b6f8d225 (diff) | |
download | qtwebengine-chromium-7b2ffa587235a47d4094787d72f38102089f402a.tar.gz |
BASELINE: Update Chromium to 76.0.3809.94
Change-Id: I321c3f5f929c105aec0f98c5091ef6108822e647
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/components/tracing')
5 files changed, 14 insertions, 8 deletions
diff --git a/chromium/components/tracing/common/stack_sampler_android.cc b/chromium/components/tracing/common/stack_sampler_android.cc index 9cb234974de..83a009623d9 100644 --- a/chromium/components/tracing/common/stack_sampler_android.cc +++ b/chromium/components/tracing/common/stack_sampler_android.cc @@ -5,6 +5,7 @@ #include "components/tracing/common/stack_sampler_android.h" #include "base/profiler/profile_builder.h" +#include "base/profiler/unwinder.h" #include "base/trace_event/trace_event.h" namespace tracing { @@ -19,7 +20,8 @@ StackSamplerAndroid::~StackSamplerAndroid() = default; // Unimplemented. StackSamplerAndroid needs to be implemented in terms of // base::StackSamplerImpl to make use of this. -void StackSamplerAndroid::AddAuxUnwinder(base::Unwinder* unwinder) {} +void StackSamplerAndroid::AddAuxUnwinder( + std::unique_ptr<base::Unwinder> unwinder) {} void StackSamplerAndroid::RecordStackFrames( StackBuffer* stack_buffer, diff --git a/chromium/components/tracing/common/stack_sampler_android.h b/chromium/components/tracing/common/stack_sampler_android.h index c8e6a6f64b9..a38b46581c8 100644 --- a/chromium/components/tracing/common/stack_sampler_android.h +++ b/chromium/components/tracing/common/stack_sampler_android.h @@ -25,7 +25,7 @@ class StackSamplerAndroid : public base::StackSampler { StackSamplerAndroid& operator=(const StackSamplerAndroid&) = delete; // StackSampler: - void AddAuxUnwinder(base::Unwinder* unwinder) override; + void AddAuxUnwinder(std::unique_ptr<base::Unwinder> unwinder) override; void RecordStackFrames(StackBuffer* stack_buffer, base::ProfileBuilder* profile_builder) override; diff --git a/chromium/components/tracing/common/trace_startup_config.cc b/chromium/components/tracing/common/trace_startup_config.cc index 7e984cb9faa..d21058d1320 100644 --- a/chromium/components/tracing/common/trace_startup_config.cc +++ b/chromium/components/tracing/common/trace_startup_config.cc @@ -242,10 +242,12 @@ bool TraceStartupConfig::EnableFromConfigFile() { bool TraceStartupConfig::EnableFromBackgroundTracing() { #if defined(OS_ANDROID) + // Tests can enable this value. is_enabled_from_background_tracing_ = + is_enabled_from_background_tracing_ || base::android::GetBackgroundStartupTracingFlag(); #else - is_enabled_from_background_tracing_ = false; + // TODO(ssid): Implement saving setting to preference for next startup. #endif // Do not set the flag to false if it's not enabled unnecessarily. if (!is_enabled_from_background_tracing_) diff --git a/chromium/components/tracing/common/trace_startup_config.h b/chromium/components/tracing/common/trace_startup_config.h index a1e4e34fc17..be13970728b 100644 --- a/chromium/components/tracing/common/trace_startup_config.h +++ b/chromium/components/tracing/common/trace_startup_config.h @@ -17,7 +17,8 @@ struct DefaultSingletonTraits; } // namespace base namespace content { -class StartupTracingControllerTest; +class CommandlineStartupTracingTest; +class BackgroundStartupTracingTest; } namespace tracing { @@ -139,7 +140,8 @@ class TRACING_EXPORT TraceStartupConfig { // This allows constructor and destructor to be private and usable only // by the Singleton class. friend struct base::DefaultSingletonTraits<TraceStartupConfig>; - friend class content::StartupTracingControllerTest; + friend class content::CommandlineStartupTracingTest; + friend class content::BackgroundStartupTracingTest; TraceStartupConfig(); ~TraceStartupConfig(); diff --git a/chromium/components/tracing/common/tracing_sampler_profiler.cc b/chromium/components/tracing/common/tracing_sampler_profiler.cc index 347cd783481..f295b55d16b 100644 --- a/chromium/components/tracing/common/tracing_sampler_profiler.cc +++ b/chromium/components/tracing/common/tracing_sampler_profiler.cc @@ -143,9 +143,9 @@ void TracingSamplerProfiler::CreateOnChildThread() { using ProfilerSlot = base::SequenceLocalStorageSlot<std::unique_ptr<TracingSamplerProfiler>>; static base::NoDestructor<ProfilerSlot> slot; - if (!slot.get()->Get()) { - slot.get()->Set(base::WrapUnique( - new TracingSamplerProfiler(base::PlatformThread::CurrentId()))); + if (!*slot) { + slot->emplace( + new TracingSamplerProfiler(base::PlatformThread::CurrentId())); } } |