#include "content/browser/locks/lock_manager.h"
#include <algorithm>
#include <list>
#include <memory>
#include <tuple>
#include <utility>
#include <vector>
#include "base/containers/contains.h"
#include "base/containers/flat_map.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/uuid.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
#include "ipc/ipc_message.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#include "third_party/abseil-cpp/absl/utility/utility.h"
LockMode;
namespace content {
namespace {
constexpr int64_t kPreemptiveLockId = …;
class LockHandleImpl final : public blink::mojom::LockHandle { … };
}
class LockManager::Lock { … };
LockManager::LockManager() = default;
LockManager::~LockManager() = default;
class LockManager::BucketState { … };
LockManager::ReceiverState::ReceiverState(std::string client_id,
storage::BucketId bucket_id)
: … { … }
LockManager::ReceiverState::ReceiverState() = default;
LockManager::ReceiverState::ReceiverState(const ReceiverState& other) = default;
LockManager::ReceiverState::~ReceiverState() = default;
void LockManager::BindReceiver(
storage::BucketId bucket_id,
mojo::PendingReceiver<blink::mojom::LockManager> receiver) { … }
void LockManager::RequestLock(
const std::string& name,
LockMode mode,
WaitMode wait,
mojo::PendingAssociatedRemote<blink::mojom::LockRequest> request_remote) { … }
void LockManager::ReleaseLock(storage::BucketId bucket_id, int64_t lock_id) { … }
void LockManager::QueryState(QueryStateCallback callback) { … }
int64_t LockManager::NextLockId() { … }
}