chromium/components/permissions/permission_request_id.h

// Copyright 2015 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_PERMISSIONS_PERMISSION_REQUEST_ID_H_
#define COMPONENTS_PERMISSIONS_PERMISSION_REQUEST_ID_H_

#include <string>

#include "base/types/id_type.h"
#include "content/public/browser/global_routing_id.h"
#include "url/gurl.h"

namespace content {
class RenderFrameHost;
}  // namespace content

namespace permissions {

// Uniquely identifies a particular permission request.
// None of the different attributes (render_process_id, render_frame_id or
// request_local_id) is enough to compare two requests. In order to check if
// a request is the same as another one, consumers of this class should use
// the operator== or operator!=.
class PermissionRequestID {};

}  // namespace permissions

namespace std {
template <>
struct hash<permissions::PermissionRequestID::RequestLocalId>
    : public permissions::PermissionRequestID::RequestLocalId::Hasher {};
}  // namespace std

#endif  // COMPONENTS_PERMISSIONS_PERMISSION_REQUEST_ID_H_