OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/policy/core/common/schema.h" | 5 #include "components/policy/core/common/schema.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 } | 1102 } |
1103 return false; | 1103 return false; |
1104 } else { | 1104 } else { |
1105 int index = rnode->string_pattern_restriction.pattern_index; | 1105 int index = rnode->string_pattern_restriction.pattern_index; |
1106 DCHECK(index == rnode->string_pattern_restriction.pattern_index_backup); | 1106 DCHECK(index == rnode->string_pattern_restriction.pattern_index_backup); |
1107 re2::RE2* regex = storage_->CompileRegex(*storage_->string_enums(index)); | 1107 re2::RE2* regex = storage_->CompileRegex(*storage_->string_enums(index)); |
1108 return re2::RE2::PartialMatch(str, *regex); | 1108 return re2::RE2::PartialMatch(str, *regex); |
1109 } | 1109 } |
1110 } | 1110 } |
1111 | 1111 |
| 1112 bool Schema::valid() const { |
| 1113 return node_ != NULL; |
| 1114 } |
| 1115 |
1112 } // namespace policy | 1116 } // namespace policy |
OLD | NEW |