chromium/base/json/values_util.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/json/values_util.h"

#include <optional>

#include "base/files/file_path.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "base/unguessable_token.h"

// Warning: The Values involved could be stored on persistent storage like files
// on disks. Therefore, changes in implementation could lead to data corruption
// and must be done with caution.

namespace base {

namespace {

// Helper to serialize/deserialize an UnguessableToken.
//
// It assumes a little-endian CPU, which is arguably a bug.
UnguessableTokenRepresentation;

}  // namespace

Value Int64ToValue(int64_t integer) {}

std::optional<int64_t> ValueToInt64(const Value* value) {}

std::optional<int64_t> ValueToInt64(const Value& value) {}

Value TimeDeltaToValue(TimeDelta time_delta) {}

std::optional<TimeDelta> ValueToTimeDelta(const Value* value) {}

std::optional<TimeDelta> ValueToTimeDelta(const Value& value) {}

Value TimeToValue(Time time) {}

std::optional<Time> ValueToTime(const Value* value) {}

std::optional<Time> ValueToTime(const Value& value) {}

Value FilePathToValue(FilePath file_path) {}

std::optional<FilePath> ValueToFilePath(const Value* value) {}

std::optional<FilePath> ValueToFilePath(const Value& value) {}

Value UnguessableTokenToValue(UnguessableToken token) {}

std::optional<UnguessableToken> ValueToUnguessableToken(const Value* value) {}

std::optional<UnguessableToken> ValueToUnguessableToken(const Value& value) {}

}  // namespace base