Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1951)

Unified Diff: base/value_conversions.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/value_conversions.h ('k') | base/values.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/value_conversions.cc
diff --git a/base/value_conversions.cc b/base/value_conversions.cc
index a461e2c31a93f09c92e0c06b1d1f97ad757401a7..9320feecc67293d7ef31ac0ca312d891dc0d3f0b 100644
--- a/base/value_conversions.cc
+++ b/base/value_conversions.cc
@@ -17,8 +17,8 @@ namespace base {
// |Value| internally stores strings in UTF-8, so we have to convert from the
// system native code to UTF-8 and back.
-StringValue* CreateFilePathValue(const FilePath& in_value) {
- return new StringValue(in_value.AsUTF8Unsafe());
+Value* CreateFilePathValue(const FilePath& in_value) {
+ return new Value(in_value.AsUTF8Unsafe());
}
bool GetValueAsFilePath(const Value& value, FilePath* file_path) {
@@ -32,9 +32,9 @@ bool GetValueAsFilePath(const Value& value, FilePath* file_path) {
// |Value| does not support 64-bit integers, and doubles do not have enough
// precision, so we store the 64-bit time value as a string instead.
-StringValue* CreateTimeDeltaValue(const TimeDelta& time) {
+Value* CreateTimeDeltaValue(const TimeDelta& time) {
std::string string_value = base::Int64ToString(time.ToInternalValue());
- return new StringValue(string_value);
+ return new Value(string_value);
}
bool GetValueAsTimeDelta(const Value& value, TimeDelta* time) {
« no previous file with comments | « base/value_conversions.h ('k') | base/values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698