chromium/chrome/browser/error_reporting/chrome_js_error_report_processor_nonchromeos.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/error_reporting/chrome_js_error_report_processor.h"

#include <utility>

#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/functional/callback_helpers.h"
#include "base/path_service.h"
#include "base/strings/escape.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/system/sys_info.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "chrome/common/chrome_paths.h"
#include "components/upload_list/crash_upload_list.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "url/gurl.h"

namespace {

constexpr char kCrashEndpointUrl[] =;
constexpr char kCrashEndpointStagingUrl[] =;

}  // namespace

void ChromeJsErrorReportProcessor::OnRequestComplete(
    std::unique_ptr<network::SimpleURLLoader> url_loader,
    base::ScopedClosureRunner callback_runner,
    base::Time report_time,
    std::unique_ptr<std::string> response_body) {}

std::string ChromeJsErrorReportProcessor::BuildPostRequestQueryString(
    const ParameterMap& params) {}

void ChromeJsErrorReportProcessor::UpdateReportDatabase(
    std::string remote_report_id,
    base::Time report_time) {}

std::string ChromeJsErrorReportProcessor::GetCrashEndpoint() {}

std::string ChromeJsErrorReportProcessor::GetCrashEndpointStaging() {}

// On non-Chrome OS platforms, send the report directly.
void ChromeJsErrorReportProcessor::SendReport(
    ParameterMap params,
    std::optional<std::string> stack_trace,
    bool send_to_production_servers,
    base::ScopedClosureRunner callback_runner,
    base::Time report_time,
    scoped_refptr<network::SharedURLLoaderFactory> loader_factory) {}

std::string ChromeJsErrorReportProcessor::GetOsVersion() {}