chromium/components/paint_preview/browser/paint_preview_file_mixin.cc

// 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.

#include "components/paint_preview/browser/paint_preview_file_mixin.h"

#include <string_view>
#include <utility>

#include "base/files/file_util.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/trace_event/common/trace_event_common.h"
#include "base/trace_event/trace_event.h"
#include "ui/accessibility/mojom/ax_tree_update.mojom.h"

namespace paint_preview {

namespace {

const char kPaintPreviewDir[] =;
const char kAxTreeFilename[] =;

// Threadpool task to read the proto from disk.
std::pair<PaintPreviewFileMixin::ProtoReadStatus,
          std::unique_ptr<PaintPreviewProto>>
GetProto(scoped_refptr<FileManager> file_manager,
         const DirectoryKey& key,
         std::optional<base::TimeDelta> expiry_horizon) {}

// Callback executed on threadpool read complete.
void OnReadProto(PaintPreviewFileMixin::OnReadProtoCallback callback,
                 std::pair<PaintPreviewFileMixin::ProtoReadStatus,
                           std::unique_ptr<PaintPreviewProto>> result) {}

}  // namespace

PaintPreviewFileMixin::PaintPreviewFileMixin(
    const base::FilePath& path,
    std::string_view ascii_feature_name)
    :{}

PaintPreviewFileMixin::~PaintPreviewFileMixin() = default;

void PaintPreviewFileMixin::GetCapturedPaintPreviewProto(
    const DirectoryKey& key,
    std::optional<base::TimeDelta> expiry_horizon,
    OnReadProtoCallback on_read_proto_callback) {}

void PaintPreviewFileMixin::WriteAXTreeUpdate(
    const DirectoryKey& key,
    base::OnceCallback<void(bool)> finished_callback,
    ui::AXTreeUpdate& ax_tree_update) {}

void PaintPreviewFileMixin::GetAXTreeUpdate(const DirectoryKey& key,
                                            OnReadAXTree callback) {}

}  // namespace paint_preview