Index: third_party/inspector_protocol/lib/ValueConversions_h.template |
diff --git a/third_party/inspector_protocol/lib/ValueConversions_h.template b/third_party/inspector_protocol/lib/ValueConversions_h.template |
index 5384c7bb1e29f8390673487fabf34a79ba9ecbdf..a347a0bb51728b4b2a8345dbf9dee3f26e100adb 100644 |
--- a/third_party/inspector_protocol/lib/ValueConversions_h.template |
+++ b/third_party/inspector_protocol/lib/ValueConversions_h.template |
@@ -15,25 +15,25 @@ namespace {{namespace}} { |
template<typename T> |
struct ValueConversions { |
- static std::unique_ptr<T> parse(protocol::Value* value, ErrorSupport* errors) |
+ static std::unique_ptr<T> fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
- return T::parse(value, errors); |
+ return T::fromValue(value, errors); |
} |
static std::unique_ptr<protocol::Value> serialize(T* value) |
{ |
- return value->serialize(); |
+ return value->toValue(); |
} |
static std::unique_ptr<protocol::Value> serialize(const std::unique_ptr<T>& value) |
{ |
- return value->serialize(); |
+ return value->toValue(); |
} |
}; |
template<> |
struct ValueConversions<bool> { |
- static bool parse(protocol::Value* value, ErrorSupport* errors) |
+ static bool fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
bool result = false; |
bool success = value ? value->asBoolean(&result) : false; |
@@ -50,7 +50,7 @@ struct ValueConversions<bool> { |
template<> |
struct ValueConversions<int> { |
- static int parse(protocol::Value* value, ErrorSupport* errors) |
+ static int fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
int result = 0; |
bool success = value ? value->asInteger(&result) : false; |
@@ -67,7 +67,7 @@ struct ValueConversions<int> { |
template<> |
struct ValueConversions<double> { |
- static double parse(protocol::Value* value, ErrorSupport* errors) |
+ static double fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
double result = 0; |
bool success = value ? value->asDouble(&result) : false; |
@@ -84,7 +84,7 @@ struct ValueConversions<double> { |
template<> |
struct ValueConversions<String> { |
- static String parse(protocol::Value* value, ErrorSupport* errors) |
+ static String fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
String result; |
bool success = value ? value->asString(&result) : false; |
@@ -101,7 +101,7 @@ struct ValueConversions<String> { |
template<> |
struct ValueConversions<Value> { |
- static std::unique_ptr<Value> parse(protocol::Value* value, ErrorSupport* errors) |
+ static std::unique_ptr<Value> fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
bool success = !!value; |
if (!success) { |
@@ -124,7 +124,7 @@ struct ValueConversions<Value> { |
template<> |
struct ValueConversions<DictionaryValue> { |
- static std::unique_ptr<DictionaryValue> parse(protocol::Value* value, ErrorSupport* errors) |
+ static std::unique_ptr<DictionaryValue> fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
bool success = value && value->type() == protocol::Value::TypeObject; |
if (!success) |
@@ -145,7 +145,7 @@ struct ValueConversions<DictionaryValue> { |
template<> |
struct ValueConversions<ListValue> { |
- static std::unique_ptr<ListValue> parse(protocol::Value* value, ErrorSupport* errors) |
+ static std::unique_ptr<ListValue> fromValue(protocol::Value* value, ErrorSupport* errors) |
{ |
bool success = value && value->type() == protocol::Value::TypeArray; |
if (!success) |