[email protected] | 90e800c | 2012-06-12 23:11:00 | [diff] [blame^] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 8703b2b | 2011-03-15 09:51:50 | [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_ | ||||
7 | #pragma once | ||||
8 | |||||
[email protected] | 90e800c | 2012-06-12 23:11:00 | [diff] [blame^] | 9 | // This file contains methods to convert things to a |Value| and back. |
[email protected] | 8703b2b | 2011-03-15 09:51:50 | [diff] [blame] | 10 | |
[email protected] | 0bea725 | 2011-08-05 15:34:00 | [diff] [blame] | 11 | #include "base/base_export.h" |
[email protected] | 9493ee9 | 2011-03-28 23:48:44 | [diff] [blame] | 12 | |
[email protected] | 8703b2b | 2011-03-15 09:51:50 | [diff] [blame] | 13 | class FilePath; |
[email protected] | 8703b2b | 2011-03-15 09:51:50 | [diff] [blame] | 14 | |
15 | namespace base { | ||||
16 | |||||
[email protected] | 90e800c | 2012-06-12 23:11:00 | [diff] [blame^] | 17 | class Time; |
[email protected] | f3a1c64 | 2011-07-12 19:15:03 | [diff] [blame] | 18 | class StringValue; |
19 | class Value; | ||||
20 | |||||
[email protected] | 8703b2b | 2011-03-15 09:51:50 | [diff] [blame] | 21 | // The caller takes ownership of the returned value. |
[email protected] | 0bea725 | 2011-08-05 15:34:00 | [diff] [blame] | 22 | BASE_EXPORT StringValue* CreateFilePathValue(const FilePath& in_value); |
23 | BASE_EXPORT bool GetValueAsFilePath(const Value& value, FilePath* file_path); | ||||
[email protected] | 8703b2b | 2011-03-15 09:51:50 | [diff] [blame] | 24 | |
[email protected] | 90e800c | 2012-06-12 23:11:00 | [diff] [blame^] | 25 | BASE_EXPORT StringValue* CreateTimeValue(const Time& time); |
26 | BASE_EXPORT bool GetValueAsTime(const Value& value, Time* time); | ||||
27 | |||||
[email protected] | 8703b2b | 2011-03-15 09:51:50 | [diff] [blame] | 28 | } // namespace |
29 | |||||
30 | #endif // BASE_VALUE_CONVERSIONS_H_ |