chromium/net/disk_cache/memory/mem_backend_impl.cc

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

#include "net/disk_cache/memory/mem_backend_impl.h"

#include <algorithm>
#include <functional>
#include <memory>
#include <utility>

#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/system/sys_info.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/clock.h"
#include "net/base/net_errors.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/memory/mem_entry_impl.h"

Time;

namespace disk_cache {

namespace {

const int kDefaultInMemoryCacheSize =;
const int kDefaultEvictionSize =;

// Returns the next entry after |node| in |lru_list| that's not a child
// of |node|.  This is useful when dooming, since dooming a parent entry
// will also doom its children.
base::LinkNode<MemEntryImpl>* NextSkippingChildren(
    const base::LinkedList<MemEntryImpl>& lru_list,
    base::LinkNode<MemEntryImpl>* node) {}

}  // namespace

MemBackendImpl::MemBackendImpl(net::NetLog* net_log)
    :{}

MemBackendImpl::~MemBackendImpl() {}

// static
std::unique_ptr<MemBackendImpl> MemBackendImpl::CreateBackend(
    int64_t max_bytes,
    net::NetLog* net_log) {}

bool MemBackendImpl::Init() {}

bool MemBackendImpl::SetMaxSize(int64_t max_bytes) {}

int64_t MemBackendImpl::MaxFileSize() const {}

void MemBackendImpl::OnEntryInserted(MemEntryImpl* entry) {}

void MemBackendImpl::OnEntryUpdated(MemEntryImpl* entry) {}

void MemBackendImpl::OnEntryDoomed(MemEntryImpl* entry) {}

void MemBackendImpl::ModifyStorageSize(int32_t delta) {}

bool MemBackendImpl::HasExceededStorageSize() const {}

void MemBackendImpl::SetPostCleanupCallback(base::OnceClosure cb) {}

// static
base::Time MemBackendImpl::Now(const base::WeakPtr<MemBackendImpl>& self) {}

void MemBackendImpl::SetClockForTesting(base::Clock* clock) {}

int32_t MemBackendImpl::GetEntryCount() const {}

EntryResult MemBackendImpl::OpenOrCreateEntry(const std::string& key,
                                              net::RequestPriority priority,
                                              EntryResultCallback callback) {}

EntryResult MemBackendImpl::OpenEntry(const std::string& key,
                                      net::RequestPriority request_priority,
                                      EntryResultCallback callback) {}

EntryResult MemBackendImpl::CreateEntry(const std::string& key,
                                        net::RequestPriority request_priority,
                                        EntryResultCallback callback) {}

net::Error MemBackendImpl::DoomEntry(const std::string& key,
                                     net::RequestPriority priority,
                                     CompletionOnceCallback callback) {}

net::Error MemBackendImpl::DoomAllEntries(CompletionOnceCallback callback) {}

net::Error MemBackendImpl::DoomEntriesBetween(Time initial_time,
                                              Time end_time,
                                              CompletionOnceCallback callback) {}

net::Error MemBackendImpl::DoomEntriesSince(Time initial_time,
                                            CompletionOnceCallback callback) {}

int64_t MemBackendImpl::CalculateSizeOfAllEntries(
    Int64CompletionOnceCallback callback) {}

int64_t MemBackendImpl::CalculateSizeOfEntriesBetween(
    base::Time initial_time,
    base::Time end_time,
    Int64CompletionOnceCallback callback) {}

class MemBackendImpl::MemIterator final : public Backend::Iterator {};

std::unique_ptr<Backend::Iterator> MemBackendImpl::CreateIterator() {}

void MemBackendImpl::OnExternalCacheHit(const std::string& key) {}

void MemBackendImpl::EvictIfNeeded() {}

void MemBackendImpl::EvictTill(int target_size) {}

void MemBackendImpl::OnMemoryPressure(
    base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) {}

}  // namespace disk_cache