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

Unified Diff: base/values.cc

Issue 2577563002: Add struct traits for base::Value. (Closed)
Patch Set: rebase Created 4 years 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/values.h ('k') | chrome/browser/importer/external_process_importer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index fd0bbe17a41468da40b3e55bc64c50ef3be5415d..ca3692deccae32ff401b99ac35487db78dc66199 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -118,6 +118,10 @@ bool Value::GetAsString(const StringValue** out_value) const {
return false;
}
+bool Value::GetAsString(StringPiece* out_value) const {
+ return false;
+}
+
bool Value::GetAsList(ListValue** out_value) {
return false;
}
@@ -287,6 +291,12 @@ bool StringValue::GetAsString(const StringValue** out_value) const {
return true;
}
+bool StringValue::GetAsString(StringPiece* out_value) const {
+ if (out_value)
+ *out_value = value_;
+ return true;
+}
+
StringValue* StringValue::DeepCopy() const {
return new StringValue(value_);
}
« no previous file with comments | « base/values.h ('k') | chrome/browser/importer/external_process_importer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698