blob: fde9a269299429c02fed339a59eb87f04aae6cfb [file] [log] [blame]
mpcomplete@chromium.orgeb7afa32012-06-13 08:11:00 +09001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
bauerb@chromium.orgfe9f8532011-03-15 18:51:50 +09002// 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_
bauerb@chromium.orgfe9f8532011-03-15 18:51:50 +09007
mpcomplete@chromium.orgeb7afa32012-06-13 08:11:00 +09008// This file contains methods to convert things to a |Value| and back.
bauerb@chromium.orgfe9f8532011-03-15 18:51:50 +09009
darin@chromium.orge585bed2011-08-06 00:34:00 +090010#include "base/base_export.h"
rvargas@google.comc3b65182011-03-29 08:48:44 +090011
bauerb@chromium.orgfe9f8532011-03-15 18:51:50 +090012
13namespace base {
14
brettw@chromium.orga7086942013-02-02 14:12:33 +090015class FilePath;
jyasskin@chromium.org8e3c3df2012-06-14 09:30:56 +090016class TimeDelta;
dmazzoni@chromium.org13e53652011-07-13 04:15:03 +090017class StringValue;
18class Value;
19
bauerb@chromium.orgfe9f8532011-03-15 18:51:50 +090020// The caller takes ownership of the returned value.
darin@chromium.orge585bed2011-08-06 00:34:00 +090021BASE_EXPORT StringValue* CreateFilePathValue(const FilePath& in_value);
22BASE_EXPORT bool GetValueAsFilePath(const Value& value, FilePath* file_path);
bauerb@chromium.orgfe9f8532011-03-15 18:51:50 +090023
jyasskin@chromium.org8e3c3df2012-06-14 09:30:56 +090024BASE_EXPORT StringValue* CreateTimeDeltaValue(const TimeDelta& time);
25BASE_EXPORT bool GetValueAsTimeDelta(const Value& value, TimeDelta* time);
mpcomplete@chromium.orgeb7afa32012-06-13 08:11:00 +090026
bauerb@chromium.orgfe9f8532011-03-15 18:51:50 +090027} // namespace
28
29#endif // BASE_VALUE_CONVERSIONS_H_