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

Unified Diff: lib/Values_cpp.template

Issue 2526603002: [inspector_protocol] Introduce protocol::Serializable (Closed)
Patch Set: minor fix Created 4 years, 1 month 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 | « lib/ValueConversions_h.template ('k') | lib/Values_h.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Values_cpp.template
diff --git a/lib/Values_cpp.template b/lib/Values_cpp.template
index 1b5cdfee227b082b3d3f3850589054af6278e497..8fe128ef4880566f8a0964119e5d8570bab12398 100644
--- a/lib/Values_cpp.template
+++ b/lib/Values_cpp.template
@@ -93,14 +93,6 @@ bool Value::asSerialized(String*) const
return false;
}
-String Value::toJSONString() const
-{
- StringBuilder result;
- StringUtil::builderReserve(result, 512);
- writeJSON(&result);
- return result.toString();
-}
-
void Value::writeJSON(StringBuilder* output) const
{
DCHECK(m_type == TypeNull);
@@ -112,6 +104,14 @@ std::unique_ptr<Value> Value::clone() const
return Value::null();
}
+String Value::serialize()
+{
+ StringBuilder result;
+ StringUtil::builderReserve(result, 512);
+ writeJSON(&result);
+ return result.toString();
+}
+
bool FundamentalValue::asBoolean(bool* output) const
{
if (type() != TypeBoolean)
« no previous file with comments | « lib/ValueConversions_h.template ('k') | lib/Values_h.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698