chromium/components/metrics/structured/lib/persistent_proto_internal.cc

// 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 "components/metrics/structured/lib/persistent_proto_internal.h"

#include <atomic>
#include <memory>
#include <string>
#include <utility>

#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
#include "base/functional/bind.h"
#include "base/rand_util.h"
#include "base/task/bind_post_task.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"

namespace metrics::structured::internal {

namespace {

// Attempts to read from |filepath| and returns a string with the file content
// if successful.
base::expected<std::string, ReadStatus> Read(const base::FilePath& filepath) {}

}  // namespace

PersistentProtoInternal::PersistentProtoInternal(
    const base::FilePath& path,
    base::TimeDelta write_delay,
    PersistentProtoInternal::ReadCallback on_read,
    PersistentProtoInternal::WriteCallback on_write)
    :{}

PersistentProtoInternal::~PersistentProtoInternal() = default;

void PersistentProtoInternal::OnReadComplete(
    ReadCallback callback,
    base::expected<std::string, ReadStatus> read_status) {}

void PersistentProtoInternal::QueueWrite() {}

void PersistentProtoInternal::OnWriteAttempt(bool write_successful) {}

void PersistentProtoInternal::OnWriteComplete(const WriteStatus status) {}

void PersistentProtoInternal::Purge() {}

std::optional<std::string> PersistentProtoInternal::SerializeData() {}

void PersistentProtoInternal::StartWriteForTesting() {}

void PersistentProtoInternal::UpdatePath(const base::FilePath& path,
                                         ReadCallback on_read,
                                         bool remove_existing) {}

void PersistentProtoInternal::DeallocProto() {}

void PersistentProtoInternal::QueueFileDelete() {}

void PersistentProtoInternal::FlushQueuedWrites() {}

}  // namespace metrics::structured::internal