blob: fde9a269299429c02fed339a59eb87f04aae6cfb [file] [log] [blame]
[email protected]90e800c2012-06-12 23:11:001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]8703b2b2011-03-15 09:51:502// 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_
[email protected]8703b2b2011-03-15 09:51:507
[email protected]90e800c2012-06-12 23:11:008// This file contains methods to convert things to a |Value| and back.
[email protected]8703b2b2011-03-15 09:51:509
[email protected]0bea7252011-08-05 15:34:0010#include "base/base_export.h"
[email protected]9493ee95c2011-03-28 23:48:4411
[email protected]8703b2b2011-03-15 09:51:5012
13namespace base {
14
[email protected]a3ef4832013-02-02 05:12:3315class FilePath;
[email protected]64a82a52012-06-14 00:30:5616class TimeDelta;
[email protected]f3a1c642011-07-12 19:15:0317class StringValue;
18class Value;
19
[email protected]8703b2b2011-03-15 09:51:5020// The caller takes ownership of the returned value.
[email protected]0bea7252011-08-05 15:34:0021BASE_EXPORT StringValue* CreateFilePathValue(const FilePath& in_value);
22BASE_EXPORT bool GetValueAsFilePath(const Value& value, FilePath* file_path);
[email protected]8703b2b2011-03-15 09:51:5023
[email protected]64a82a52012-06-14 00:30:5624BASE_EXPORT StringValue* CreateTimeDeltaValue(const TimeDelta& time);
25BASE_EXPORT bool GetValueAsTimeDelta(const Value& value, TimeDelta* time);
[email protected]90e800c2012-06-12 23:11:0026
[email protected]8703b2b2011-03-15 09:51:5027} // namespace
28
29#endif // BASE_VALUE_CONVERSIONS_H_