| 543 | |
| 544 | |
| 545 | Option<Error> validateOfferFilters(const FrameworkInfo& frameworkInfo) |
| 546 | { |
| 547 | // Use `auto` in place of `protobuf::MapPair<string, Value::Scalar>` |
| 548 | // below since `foreach` is a macro and cannot contain angle brackets. |
| 549 | foreach (auto&& filter, frameworkInfo.offer_filters()) { |
| 550 | const OfferFilters& offerFilters = filter.second; |
| 551 | |
| 552 | Option<Error> error = |
| 553 | common::validation::validateOfferFilters(offerFilters); |
| 554 | |
| 555 | if (error.isSome()) { |
| 556 | return error; |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | return None(); |
| 561 | } |
| 562 | |
| 563 | } // namespace internal { |
| 564 | |