chromium/components/gwp_asan/crash_handler/crash_handler.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/gwp_asan/crash_handler/crash_handler.h"

#include <stddef.h>
#include <memory>
#include <string>

#include "base/logging.h"
#include "components/gwp_asan/crash_handler/crash.pb.h"
#include "components/gwp_asan/crash_handler/crash_analyzer.h"
#include "third_party/crashpad/crashpad/minidump/minidump_user_extension_stream_data_source.h"
#include "third_party/crashpad/crashpad/snapshot/process_snapshot.h"

namespace gwp_asan {
namespace internal {
namespace {

// Return a serialized protobuf using a wrapper interface that
// crashpad::UserStreamDataSource expects us to return.
class BufferExtensionStreamDataSource final
    : public crashpad::MinidumpUserExtensionStreamDataSource {};

BufferExtensionStreamDataSource::BufferExtensionStreamDataSource(
    uint32_t stream_type,
    const Crash& crash)
    :{}

size_t BufferExtensionStreamDataSource::StreamDataSize() {}

bool BufferExtensionStreamDataSource::ReadStreamData(Delegate* delegate) {}

const char* ErrorToString(Crash_ErrorType type) {}

const char* AllocatorToString(Crash_Allocator allocator) {}

std::unique_ptr<crashpad::MinidumpUserExtensionStreamDataSource>
HandleException(const crashpad::ProcessSnapshot& snapshot) {}

}  // namespace
}  // namespace internal

std::unique_ptr<crashpad::MinidumpUserExtensionStreamDataSource>
UserStreamDataSource::ProduceStreamData(crashpad::ProcessSnapshot* snapshot) {}

}  // namespace gwp_asan