chromium/components/user_notes/interfaces/user_note_metadata_snapshot.h

// Copyright 2022 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_USER_NOTES_INTERFACES_USER_NOTE_METADATA_SNAPSHOT_H_
#define COMPONENTS_USER_NOTES_INTERFACES_USER_NOTE_METADATA_SNAPSHOT_H_

#include <memory>
#include <string>
#include <unordered_map>

#include "base/unguessable_token.h"
#include "url/gurl.h"

namespace user_notes {

class UserNoteMetadata;

// In order to have GURL as a key in a hashmap, GURL hashing mechanism is
// needed.
struct GURLHash {};

// A class that encapsulates an
// `unordered_map<GURL, unordered_map<ID, UserNoteMetadata>>`. This represents
// a snapshot of the note metadata contained in the database for a set of URLs.
// The first map is to group metadata by URL, which makes it easy to look up
// what notes are attached to that URL. The second map is for quick lookup of a
// note's metadata by its ID. Using this class makes code simpler and clearer
// than if using the raw type.
class UserNoteMetadataSnapshot {};

}  // namespace user_notes

#endif  // COMPONENTS_USER_NOTES_INTERFACES_USER_NOTE_METADATA_SNAPSHOT_H_