stack_sampler.cc 725 B

123456789101112131415161718192021222324252627
  1. // Copyright 2015 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. #include "base/profiler/stack_sampler.h"
  5. #include "base/memory/ptr_util.h"
  6. #include "base/profiler/stack_buffer.h"
  7. namespace base {
  8. StackSampler::StackSampler() = default;
  9. StackSampler::~StackSampler() = default;
  10. std::unique_ptr<StackBuffer> StackSampler::CreateStackBuffer() {
  11. size_t size = GetStackBufferSize();
  12. if (size == 0)
  13. return nullptr;
  14. return std::make_unique<StackBuffer>(size);
  15. }
  16. StackSamplerTestDelegate::~StackSamplerTestDelegate() = default;
  17. StackSamplerTestDelegate::StackSamplerTestDelegate() = default;
  18. } // namespace base