#include "content/browser/file_system_access/file_system_access_lock_manager.h"
#include <optional>
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/memory/raw_ref.h"
#include "base/types/optional_ref.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "content/browser/file_system_access/features.h"
#include "content/public/browser/disallow_activation_reason.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/render_frame_host.h"
#include "storage/browser/file_system/file_system_url.h"
#include "storage/common/file_system/file_system_types.h"
#include "third_party/blink/public/common/features_generated.h"
namespace content {
LockHandle;
LockType;
class Lock { … };
class RootLock : public Lock { … };
FileSystemAccessLockManager::RootLocator
FileSystemAccessLockManager::RootLocator::FromFileSystemURL(
const storage::FileSystemURL& url) { … }
FileSystemAccessLockManager::RootLocator::RootLocator(
const EntryPathType& type,
const std::optional<storage::BucketLocator>& bucket_locator)
: … { … }
FileSystemAccessLockManager::RootLocator::RootLocator(const RootLocator&) =
default;
FileSystemAccessLockManager::RootLocator::~RootLocator() = default;
bool FileSystemAccessLockManager::RootLocator::operator<(
const RootLocator& other) const { … }
LockHandle::LockHandle(base::WeakPtr<Lock> lock,
scoped_refptr<LockHandle> parent_lock_handle,
const GlobalRenderFrameHostId& frame_id)
: … { … }
LockHandle::~LockHandle() { … }
FileSystemAccessLockManager::FileSystemAccessLockManager(
base::PassKey<FileSystemAccessManagerImpl> )
: … { … }
FileSystemAccessLockManager::~FileSystemAccessLockManager() = default;
bool FileSystemAccessLockManager::IsContentious(
const storage::FileSystemURL& url,
LockType lock_type) { … }
void FileSystemAccessLockManager::TakeLock(
const GlobalRenderFrameHostId& frame_id,
const storage::FileSystemURL& url,
LockType lock_type,
TakeLockCallback callback) { … }
void FileSystemAccessLockManager::ReleaseRoot(const RootLocator& root_locator) { … }
RootLock* FileSystemAccessLockManager::GetRootLock(
const RootLocator& root_locator) { … }
RootLock* FileSystemAccessLockManager::GetOrCreateRootLock(
const RootLocator& root_locator) { … }
FileSystemAccessLockManager::LockType
FileSystemAccessLockManager::CreateSharedLockType() { … }
FileSystemAccessLockManager::LockType
FileSystemAccessLockManager::GetExclusiveLockType() { … }
FileSystemAccessLockManager::LockType
FileSystemAccessLockManager::GetAncestorLockTypeForTesting() { … }
base::WeakPtr<FileSystemAccessLockManager>
FileSystemAccessLockManager::GetWeakPtrForTesting() { … }
}