#ifndef NET_FIRST_PARTY_SETS_FIRST_PARTY_SET_METADATA_H_
#define NET_FIRST_PARTY_SETS_FIRST_PARTY_SET_METADATA_H_
#include <optional>
#include "net/base/net_export.h"
#include "net/first_party_sets/first_party_set_entry.h"
namespace net {
class NET_EXPORT FirstPartySetMetadata {
public:
FirstPartySetMetadata();
FirstPartySetMetadata(std::optional<FirstPartySetEntry> frame_entry,
std::optional<FirstPartySetEntry> top_frame_entry);
FirstPartySetMetadata(FirstPartySetMetadata&&);
FirstPartySetMetadata& operator=(FirstPartySetMetadata&&);
~FirstPartySetMetadata();
bool operator==(const FirstPartySetMetadata& other) const;
const std::optional<FirstPartySetEntry>& frame_entry() const {
return frame_entry_;
}
const std::optional<FirstPartySetEntry>& top_frame_entry() const {
return top_frame_entry_;
}
bool AreSitesInSameFirstPartySet() const;
private:
std::optional<FirstPartySetEntry> frame_entry_ = std::nullopt;
std::optional<FirstPartySetEntry> top_frame_entry_ = std::nullopt;
};
NET_EXPORT std::ostream& operator<<(std::ostream& os,
const FirstPartySetMetadata& fpsm);
}
#endif