// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_RESOURCE_CACHE_H_ #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_RESOURCE_CACHE_H_ #include <stdint.h> #include <map> #include <memory> #include <optional> #include <set> #include <string> #include "base/files/file_path.h" #include "base/functional/callback_forward.h" #include "base/memory/ref_counted.h" #include "components/policy/policy_export.h" namespace base { class SequencedTaskRunner; } namespace policy { // Manages storage of data at a given path. The data is keyed by a key and // a subkey, and can be queried by (key, subkey) or (key) lookups. // The contents of the cache have to be manually cleared using Delete() or // Purge*(). // The class can be instantiated on any thread but from then on, it must be // accessed via the |task_runner| only. The |task_runner| must support file I/O. // The class needs to have exclusive control on cache directory since it should // know about all files changes for correct recalculating cache directory size. class POLICY_EXPORT ResourceCache { … }; } // namespace policy #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_RESOURCE_CACHE_H_