1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef BASE_VALUE_CONVERSIONS_H_
6#define BASE_VALUE_CONVERSIONS_H_
7
8// This file contains methods to convert things to a |Value| and back.
9
10#include "base/base_export.h"
11
12
13namespace base {
14
15class FilePath;
16class TimeDelta;
17class StringValue;
18class Value;
19
20// The caller takes ownership of the returned value.
21BASE_EXPORT StringValue* CreateFilePathValue(const FilePath& in_value);
22BASE_EXPORT bool GetValueAsFilePath(const Value& value, FilePath* file_path);
23
24BASE_EXPORT StringValue* CreateTimeDeltaValue(const TimeDelta& time);
25BASE_EXPORT bool GetValueAsTimeDelta(const Value& value, TimeDelta* time);
26
27}  // namespace
28
29#endif  // BASE_VALUE_CONVERSIONS_H_
30