Files
rk35xx-android14/external/libchrome/base/value_conversions.h
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

36 lines
1.1 KiB
C++

// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_VALUE_CONVERSIONS_H_
#define BASE_VALUE_CONVERSIONS_H_
// This file contains methods to convert things to a |Value| and back.
#include <memory>
#include "base/base_export.h"
namespace base {
class FilePath;
class TimeDelta;
class UnguessableToken;
class Value;
// The caller takes ownership of the returned value.
BASE_EXPORT std::unique_ptr<Value> CreateFilePathValue(
const FilePath& in_value);
BASE_EXPORT bool GetValueAsFilePath(const Value& value, FilePath* file_path);
BASE_EXPORT std::unique_ptr<Value> CreateTimeDeltaValue(const TimeDelta& time);
BASE_EXPORT bool GetValueAsTimeDelta(const Value& value, TimeDelta* time);
BASE_EXPORT std::unique_ptr<Value> CreateUnguessableTokenValue(
const UnguessableToken& token);
BASE_EXPORT bool GetValueAsUnguessableToken(const Value& value,
UnguessableToken* token);
} // namespace base
#endif // BASE_VALUE_CONVERSIONS_H_