chromium/components/crash/content/browser/error_reporting/js_error_report_processor.h

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

#ifndef COMPONENTS_CRASH_CONTENT_BROWSER_ERROR_REPORTING_JS_ERROR_REPORT_PROCESSOR_H_
#define COMPONENTS_CRASH_CONTENT_BROWSER_ERROR_REPORTING_JS_ERROR_REPORT_PROCESSOR_H_

#include "base/component_export.h"
#include "base/functional/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"

namespace content {
class BrowserContext;
}
struct JavaScriptErrorReport;

// Interface class that exposes the SendErrorReport function.
// We use RefCountedThreadSafe instead of the more normal RefCounted or WeakPtrs
// because multiple reports can be in-flight at the same time, each on a
// different sequence, but still using the same JsErrorReportProcessor.
class COMPONENT_EXPORT(JS_ERROR_REPORTING) JsErrorReportProcessor
    : public base::RefCountedThreadSafe<JsErrorReportProcessor> {};

#endif  // COMPONENTS_CRASH_CONTENT_BROWSER_ERROR_REPORTING_JS_ERROR_REPORT_PROCESSOR_H_