mpcomplete@chromium.org | eb7afa3 | 2012-06-13 08:11:00 +0900 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
bauerb@chromium.org | fe9f853 | 2011-03-15 18:51:50 +0900 | [diff] [blame] | 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_ |
bauerb@chromium.org | fe9f853 | 2011-03-15 18:51:50 +0900 | [diff] [blame] | 7 | |
mpcomplete@chromium.org | eb7afa3 | 2012-06-13 08:11:00 +0900 | [diff] [blame] | 8 | // This file contains methods to convert things to a |Value| and back. |
bauerb@chromium.org | fe9f853 | 2011-03-15 18:51:50 +0900 | [diff] [blame] | 9 | |
darin@chromium.org | e585bed | 2011-08-06 00:34:00 +0900 | [diff] [blame] | 10 | #include "base/base_export.h" |
rvargas@google.com | c3b6518 | 2011-03-29 08:48:44 +0900 | [diff] [blame] | 11 | |
bauerb@chromium.org | fe9f853 | 2011-03-15 18:51:50 +0900 | [diff] [blame] | 12 | |
| 13 | namespace base { |
| 14 | |
brettw@chromium.org | a708694 | 2013-02-02 14:12:33 +0900 | [diff] [blame] | 15 | class FilePath; |
jyasskin@chromium.org | 8e3c3df | 2012-06-14 09:30:56 +0900 | [diff] [blame] | 16 | class TimeDelta; |
dmazzoni@chromium.org | 13e5365 | 2011-07-13 04:15:03 +0900 | [diff] [blame] | 17 | class StringValue; |
| 18 | class Value; |
| 19 | |
bauerb@chromium.org | fe9f853 | 2011-03-15 18:51:50 +0900 | [diff] [blame] | 20 | // The caller takes ownership of the returned value. |
darin@chromium.org | e585bed | 2011-08-06 00:34:00 +0900 | [diff] [blame] | 21 | BASE_EXPORT StringValue* CreateFilePathValue(const FilePath& in_value); |
| 22 | BASE_EXPORT bool GetValueAsFilePath(const Value& value, FilePath* file_path); |
bauerb@chromium.org | fe9f853 | 2011-03-15 18:51:50 +0900 | [diff] [blame] | 23 | |
jyasskin@chromium.org | 8e3c3df | 2012-06-14 09:30:56 +0900 | [diff] [blame] | 24 | BASE_EXPORT StringValue* CreateTimeDeltaValue(const TimeDelta& time); |
| 25 | BASE_EXPORT bool GetValueAsTimeDelta(const Value& value, TimeDelta* time); |
mpcomplete@chromium.org | eb7afa3 | 2012-06-13 08:11:00 +0900 | [diff] [blame] | 26 | |
danakj | 651c3e2 | 2015-03-07 10:51:42 +0900 | [diff] [blame] | 27 | } // namespace base |
bauerb@chromium.org | fe9f853 | 2011-03-15 18:51:50 +0900 | [diff] [blame] | 28 | |
| 29 | #endif // BASE_VALUE_CONVERSIONS_H_ |