#include "extensions/browser/api/storage/storage_api.h"
#include <stddef.h>
#include <string>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/api/storage/session_storage_manager.h"
#include "extensions/browser/api/storage/storage_frontend.h"
#include "extensions/browser/api/storage/storage_utils.h"
#include "extensions/browser/quota_service.h"
#include "extensions/common/api/storage.h"
#include "extensions/common/features/feature.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/mojom/context_type.mojom.h"
ValueStore;
namespace extensions {
namespace {
std::vector<std::string> GetKeysFromList(const base::Value::List& list) { … }
std::vector<std::string> GetKeysFromDict(const base::Value::Dict& dict) { … }
void GetModificationQuotaLimitHeuristics(QuotaLimitHeuristics* heuristics) { … }
}
SettingsFunction::SettingsFunction() = default;
SettingsFunction::~SettingsFunction() = default;
bool SettingsFunction::ShouldSkipQuotaLimiting() const { … }
bool SettingsFunction::PreRunValidation(std::string* error) { … }
bool SettingsFunction::IsAccessToStorageAllowed() { … }
void SettingsFunction::OnWriteOperationFinished(
StorageFrontend::ResultStatus status) { … }
ExtensionFunction::ResponseAction StorageStorageAreaGetFunction::Run() { … }
void StorageStorageAreaGetFunction::OnGetOperationFinished(
std::optional<base::Value::Dict> defaults,
StorageFrontend::GetResult result) { … }
ExtensionFunction::ResponseAction StorageStorageAreaGetKeysFunction::Run() { … }
void StorageStorageAreaGetKeysFunction::OnGetKeysOperationFinished(
StorageFrontend::GetKeysResult result) { … }
ExtensionFunction::ResponseAction
StorageStorageAreaGetBytesInUseFunction::Run() { … }
void StorageStorageAreaGetBytesInUseFunction::OnGetBytesInUseOperationFinished(
size_t bytes_in_use) { … }
ExtensionFunction::ResponseAction StorageStorageAreaSetFunction::Run() { … }
void StorageStorageAreaSetFunction::GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const { … }
ExtensionFunction::ResponseAction StorageStorageAreaRemoveFunction::Run() { … }
void StorageStorageAreaRemoveFunction::GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const { … }
ExtensionFunction::ResponseAction StorageStorageAreaClearFunction::Run() { … }
void StorageStorageAreaClearFunction::GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const { … }
ExtensionFunction::ResponseAction
StorageStorageAreaSetAccessLevelFunction::Run() { … }
}