blob: e1a842a5d8b2be94018d5db90507a2dafd539697 [file] [log] [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/host/crash/minidump_handler.h"
#include "base/functional/bind.h"
#include "remoting/base/crash/breakpad_utils.h"
namespace remoting {
MinidumpHandler::MinidumpHandler() {
// base::Unretained is sound as this instance controls the lifetime of both
// |crash_directory_watcher_| and |crash_file_uploader_| and the Upload
// callback runs on this sequence.
crash_directory_watcher_.Watch(
GetMinidumpDirectoryPath(),
base::BindRepeating(&CrashFileUploader::Upload,
base::Unretained(&crash_file_uploader_)));
}
MinidumpHandler::~MinidumpHandler() = default;
} // namespace remoting