chromium/components/image_fetcher/core/cache/image_data_store_disk.cc

// Copyright 2018 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/image_fetcher/core/cache/image_data_store_disk.h"

#include <utility>
#include <vector>

#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"

File;
FileEnumerator;
FilePath;

namespace image_fetcher {

namespace {

// The prefix of the file names for images that need transcoding before use.
constexpr char kNeedsTranscodingPrefix[] =;

const FilePath::CharType kPathPostfix[] =);

InitializationStatus InitializeImpl(FilePath storage_path) {}

base::FilePath BuildFilePath(const FilePath& storage_path,
                             const std::string& key,
                             bool needs_transcoding) {}

void SaveImageImpl(FilePath storage_path,
                   const std::string& key,
                   std::string data,
                   bool needs_transcoding) {}

std::string LoadImageImpl(FilePath storage_path,
                          const std::string& key,
                          bool needs_transcoding) {}

void DeleteImageImpl(FilePath storage_path, const std::string& key) {}

std::vector<std::string> GetAllKeysImpl(FilePath storage_path) {}

}  // namespace

// TODO(wylieb): Add histogram for failures.
ImageDataStoreDisk::ImageDataStoreDisk(
    FilePath generic_storage_path,
    scoped_refptr<base::SequencedTaskRunner> task_runner)
    :{}

ImageDataStoreDisk::~ImageDataStoreDisk() = default;

void ImageDataStoreDisk::Initialize(base::OnceClosure callback) {}

bool ImageDataStoreDisk::IsInitialized() {}

void ImageDataStoreDisk::SaveImage(const std::string& key,
                                   std::string image_data,
                                   bool needs_transcoding) {}

void ImageDataStoreDisk::LoadImage(const std::string& key,
                                   bool needs_transcoding,
                                   ImageDataCallback callback) {}

void ImageDataStoreDisk::DeleteImage(const std::string& key) {}

void ImageDataStoreDisk::GetAllKeys(KeysCallback callback) {}

void ImageDataStoreDisk::OnInitializationComplete(
    base::OnceClosure callback,
    InitializationStatus initialization_status) {}

void ImageDataStoreDisk::OnImageLoaded(bool needs_transcoding,
                                       ImageDataCallback callback,
                                       std::string data) {}

}  // namespace image_fetcher