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

Side by Side Diff: mojo/public/cpp/bindings/lib/validate_params.h

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATE_PARAMS_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATE_PARAMS_H_
7
8 namespace mojo {
9 namespace internal {
10
11 // Array type information needed for valdiation.
12 template <uint32_t in_expected_num_elements,
13 bool in_element_is_nullable,
14 typename InElementValidateParams>
15 class ArrayValidateParams {
16 public:
17 // Validation information for elements. It is either another specialization
18 // of ArrayValidateParams (if elements are arrays or maps), or
19 // NoValidateParams. In the case of maps, this is used to validate the value
20 // array.
21 typedef InElementValidateParams ElementValidateParams;
22
23 // If |expected_num_elements| is not 0, the array is expected to have exactly
24 // that number of elements.
25 static const uint32_t expected_num_elements = in_expected_num_elements;
26 // Whether the elements are nullable.
27 static const bool element_is_nullable = in_element_is_nullable;
28 };
29
30 // NoValidateParams is used to indicate the end of an ArrayValidateParams chain.
31 class NoValidateParams {};
32
33 } // namespace internal
34 } // namespace mojo
35
36 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATE_PARAMS_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/union_accessor.h ('k') | mojo/public/cpp/bindings/lib/validation_errors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698