Roll android_tools deps to the latest.
[chromium-blink-merge.git] / base / value_conversions.h
blobfde9a269299429c02fed339a59eb87f04aae6cfb
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.
5 #ifndef BASE_VALUE_CONVERSIONS_H_
6 #define BASE_VALUE_CONVERSIONS_H_
8 // This file contains methods to convert things to a |Value| and back.
10 #include "base/base_export.h"
13 namespace base {
15 class FilePath;
16 class TimeDelta;
17 class StringValue;
18 class Value;
20 // The caller takes ownership of the returned value.
21 BASE_EXPORT StringValue* CreateFilePathValue(const FilePath& in_value);
22 BASE_EXPORT bool GetValueAsFilePath(const Value& value, FilePath* file_path);
24 BASE_EXPORT StringValue* CreateTimeDeltaValue(const TimeDelta& time);
25 BASE_EXPORT bool GetValueAsTimeDelta(const Value& value, TimeDelta* time);
27 } // namespace
29 #endif // BASE_VALUE_CONVERSIONS_H_