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

Unified Diff: mojo/public/cpp/bindings/lib/array_internal.h

Issue 2030873002: Mojo C++ bindings: rename ArrayValidateParams for clarity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-enums
Patch Set: Rebase Created 4 years, 6 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 | « no previous file | mojo/public/cpp/bindings/lib/array_serialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/array_internal.h
diff --git a/mojo/public/cpp/bindings/lib/array_internal.h b/mojo/public/cpp/bindings/lib/array_internal.h
index e0f92626377403ac8a865f8af08f67809b6192a2..d2a3e36f12767a0ef66785c9354d40c6c9355ffa 100644
--- a/mojo/public/cpp/bindings/lib/array_internal.h
+++ b/mojo/public/cpp/bindings/lib/array_internal.h
@@ -147,7 +147,7 @@ struct ArraySerializationHelper<T, false> {
static bool ValidateElements(const ArrayHeader* header,
const ElementType* elements,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
DCHECK(!validate_params->element_is_nullable)
<< "Primitive type should be non-nullable";
DCHECK(!validate_params->element_validate_params)
@@ -178,7 +178,7 @@ struct ArraySerializationHelper<Handle_Data, false> {
static bool ValidateElements(const ArrayHeader* header,
const ElementType* elements,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
DCHECK(!validate_params->element_validate_params)
<< "Handle type should not have array validate params";
@@ -218,7 +218,7 @@ struct ArraySerializationHelper<P*, false> {
static bool ValidateElements(const ArrayHeader* header,
const ElementType* elements,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
for (uint32_t i = 0; i < header->num_elements; ++i) {
if (!validate_params->element_is_nullable && !elements[i].offset) {
ReportValidationError(
@@ -246,7 +246,7 @@ struct ArraySerializationHelper<P*, false> {
struct ValidateCaller {
static bool Run(const void* data,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
DCHECK(!validate_params)
<< "Struct type should not have array validate params";
@@ -258,7 +258,7 @@ struct ArraySerializationHelper<P*, false> {
struct ValidateCaller<Map_Data<Key, Value>> {
static bool Run(const void* data,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
return Map_Data<Key, Value>::Validate(data, bounds_checker,
validate_params);
}
@@ -268,7 +268,7 @@ struct ArraySerializationHelper<P*, false> {
struct ValidateCaller<Array_Data<T>> {
static bool Run(const void* data,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
return Array_Data<T>::Validate(data, bounds_checker, validate_params);
}
};
@@ -291,7 +291,7 @@ struct ArraySerializationHelper<U, true> {
static bool ValidateElements(const ArrayHeader* header,
const ElementType* elements,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
for (uint32_t i = 0; i < header->num_elements; ++i) {
if (!validate_params->element_is_nullable && elements[i].is_null()) {
ReportValidationError(
@@ -332,7 +332,7 @@ class Array_Data {
static bool Validate(const void* data,
BoundsChecker* bounds_checker,
- const ArrayValidateParams* validate_params) {
+ const ContainerValidateParams* validate_params) {
if (!data)
return true;
if (!IsAligned(data)) {
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/array_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698