#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
#include <sstream>
#include <string>
#include <utility>
#include "base/ranges/algorithm.h"
namespace blink {
namespace {
std::string string_to_hex(const std::string& input) { … }
const size_t kOverheadSize = …;
size_t CalculateArraySize(const IndexedDBKey::KeyArray& keys) { … }
template <typename T>
int Compare(const T& a, const T& b) { … }
}
IndexedDBKey::IndexedDBKey()
: … { … }
IndexedDBKey::IndexedDBKey(mojom::IDBKeyType type)
: … { … }
IndexedDBKey::IndexedDBKey(double number, mojom::IDBKeyType type)
: … { … }
IndexedDBKey::IndexedDBKey(KeyArray array)
: … { … }
IndexedDBKey::IndexedDBKey(std::string binary)
: … { … }
IndexedDBKey::IndexedDBKey(std::u16string string)
: … { … }
IndexedDBKey::IndexedDBKey(const IndexedDBKey& other) = default;
IndexedDBKey::IndexedDBKey(IndexedDBKey&& other) = default;
IndexedDBKey::~IndexedDBKey() = default;
IndexedDBKey& IndexedDBKey::operator=(const IndexedDBKey& other) = default;
bool IndexedDBKey::IsValid() const { … }
bool IndexedDBKey::IsLessThan(const IndexedDBKey& other) const { … }
bool IndexedDBKey::Equals(const IndexedDBKey& other) const { … }
bool IndexedDBKey::HasHoles() const { … }
IndexedDBKey IndexedDBKey::FillHoles(const IndexedDBKey& primary_key) const { … }
std::string IndexedDBKey::DebugString() const { … }
int IndexedDBKey::CompareTo(const IndexedDBKey& other) const { … }
}