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

Unified Diff: third_party/inspector_protocol/lib/Array_h.template

Issue 2523583005: Roll third_party/inspector_protocol to 4ad35c45aca9834b67ec2cb152c816ea1b7ceb48 (Closed)
Patch Set: added default implementation 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
Index: third_party/inspector_protocol/lib/Array_h.template
diff --git a/third_party/inspector_protocol/lib/Array_h.template b/third_party/inspector_protocol/lib/Array_h.template
index a258da1cc5630b4831b2ceb44b69074ffcfb079e..3854f6e5cd102e9962e847e2650b0b6d3f8ef161 100644
--- a/third_party/inspector_protocol/lib/Array_h.template
+++ b/third_party/inspector_protocol/lib/Array_h.template
@@ -22,7 +22,7 @@ public:
return std::unique_ptr<Array<T>>(new Array<T>());
}
- static std::unique_ptr<Array<T>> parse(protocol::Value* value, ErrorSupport* errors)
+ static std::unique_ptr<Array<T>> fromValue(protocol::Value* value, ErrorSupport* errors)
{
protocol::ListValue* array = ListValue::cast(value);
if (!array) {
@@ -33,7 +33,7 @@ public:
errors->push();
for (size_t i = 0; i < array->size(); ++i) {
errors->setName(StringUtil::fromInteger(i));
- std::unique_ptr<T> item = ValueConversions<T>::parse(array->at(i), errors);
+ std::unique_ptr<T> item = ValueConversions<T>::fromValue(array->at(i), errors);
result->m_vector.push_back(std::move(item));
}
errors->pop();
@@ -57,11 +57,11 @@ public:
return m_vector[index].get();
}
- std::unique_ptr<protocol::ListValue> serialize()
+ std::unique_ptr<protocol::ListValue> toValue()
{
std::unique_ptr<protocol::ListValue> result = ListValue::create();
for (auto& item : m_vector)
- result->pushValue(ValueConversions<T>::serialize(item));
+ result->pushValue(ValueConversions<T>::toValue(item));
return result;
}
@@ -77,7 +77,7 @@ public:
return std::unique_ptr<Array<T>>(new Array<T>());
}
- static std::unique_ptr<Array<T>> parse(protocol::Value* value, ErrorSupport* errors)
+ static std::unique_ptr<Array<T>> fromValue(protocol::Value* value, ErrorSupport* errors)
{
protocol::ListValue* array = ListValue::cast(value);
if (!array) {
@@ -88,7 +88,7 @@ public:
std::unique_ptr<Array<T>> result(new Array<T>());
for (size_t i = 0; i < array->size(); ++i) {
errors->setName(StringUtil::fromInteger(i));
- T item = ValueConversions<T>::parse(array->at(i), errors);
+ T item = ValueConversions<T>::fromValue(array->at(i), errors);
result->m_vector.push_back(item);
}
errors->pop();
@@ -112,11 +112,11 @@ public:
return m_vector[index];
}
- std::unique_ptr<protocol::ListValue> serialize()
+ std::unique_ptr<protocol::ListValue> toValue()
{
std::unique_ptr<protocol::ListValue> result = ListValue::create();
for (auto& item : m_vector)
- result->pushValue(ValueConversions<T>::serialize(item));
+ result->pushValue(ValueConversions<T>::toValue(item));
return result;
}
« no previous file with comments | « third_party/inspector_protocol/README.v8 ('k') | third_party/inspector_protocol/lib/DispatcherBase_cpp.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698