blob: bfdec70a91ad18da24d24feaae68ab6fad4874d9 [file] [log] [blame]
// 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.
// 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 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);
} // namespace base