|
@@ -7,6 +7,7 @@
|
|
|
#pragma once
|
|
|
|
|
|
#include <AK/Optional.h>
|
|
|
+#include <AK/Traits.h>
|
|
|
#include <LibURL/Origin.h>
|
|
|
#include <LibWeb/Forward.h>
|
|
|
|
|
@@ -32,3 +33,13 @@ Optional<StorageKey> obtain_a_storage_key(HTML::Environment const&);
|
|
|
StorageKey obtain_a_storage_key_for_non_storage_purposes(HTML::Environment const&);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+namespace AK {
|
|
|
+template<>
|
|
|
+struct Traits<Web::StorageAPI::StorageKey> : public DefaultTraits<Web::StorageAPI::StorageKey> {
|
|
|
+ static unsigned hash(Web::StorageAPI::StorageKey const& key)
|
|
|
+ {
|
|
|
+ return Traits<URL::Origin>::hash(key.origin);
|
|
|
+ }
|
|
|
+};
|
|
|
+}
|