chromium/components/feedback/feedback_util.cc

// Copyright 2014 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 "components/feedback/feedback_util.h"

#include <optional>
#include <string>
#include <vector>

#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "components/feedback/feedback_report.h"
#include "third_party/zlib/google/zip.h"

namespace {

constexpr char kMultilineIndicatorString[] =;
constexpr char kMultilineStartString[] =;
constexpr char kMultilineEndString[] =;

}  // namespace

namespace feedback_util {

std::optional<std::string> ZipString(const base::FilePath& filename,
                                     std::string_view data) {}

std::string LogsToString(const FeedbackCommon::SystemLogsMap& sys_info) {}

void RemoveUrlsFromAutofillData(std::string& autofill_metadata) {}

// Note: This function is excluded from win build because its unit tests do
// not pass on OS_WIN.
// This function is only called on ChromeOS and Lacros build.
// See https://crbug.com/1119560.
#if !BUILDFLAG(IS_WIN)
std::optional<std::string> ReadEndOfFile(const base::FilePath& path,
                                         size_t max_size) {}
#endif  // !BUILDFLAG(IS_WIN)

}  // namespace feedback_util