OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 NET_BASE_DAFSA_LOOKUP_STRING_H_ |
| 6 #define NET_BASE_DAFSA_LOOKUP_STRING_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 |
| 10 namespace net { |
| 11 |
| 12 const int kNotFound = -1; |
| 13 const int kExceptionRule = 1; |
| 14 const int kWildcardRule = 2; |
| 15 const int kPrivateRule = 4; |
| 16 |
| 17 // Lookup a domain key in a byte array generated by make_dafsa.py. |
| 18 // The rule type is returned if key is found, otherwise kNotFound is returned. |
| 19 int LookupString(const unsigned char* graph, |
| 20 size_t length, |
| 21 const char* key, |
| 22 size_t key_length); |
| 23 |
| 24 } // namespace net |
| 25 |
| 26 #endif // NET_BASE_DAFSA_LOOKUP_STRING_H_ |
OLD | NEW |