Chromium Code Reviews| Index: net/base/dafsa/lookup_string.h |
| diff --git a/net/base/dafsa/lookup_string.h b/net/base/dafsa/lookup_string.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0d87f5f4050fe1c0e33d0e3735d4fbd88cbcc3dc |
| --- /dev/null |
| +++ b/net/base/dafsa/lookup_string.h |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_BASE_DAFSA_LOOKUP_STRING_H_ |
| +#define NET_BASE_DAFSA_LOOKUP_STRING_H_ |
| + |
| +#include <stddef.h> |
| + |
| +#include "net/base/net_export.h" |
| + |
| +namespace net { |
| + |
| +const int kDafsaNotFound = -1; |
| +const int kDafsaExceptionRule = 1; |
| +const int kDafsaWildcardRule = 2; |
| +const int kDafsaPrivateRule = 4; |
| + |
| +// Lookup a domain key in a byte array |graph| generated by make_dafsa.py. The |
|
eroman
2015/11/06 23:35:50
As a standalone function this needs a lot more con
Adam Rice
2015/11/09 11:01:21
I have expanded on the comment to hopefully make i
|
| +// rule type is returned if |key| is found, otherwise kDafsaNotFound is |
| +// returned. |
| +int NET_EXPORT_PRIVATE LookupStringInDafsa(const unsigned char* graph, |
|
eroman
2015/11/06 23:35:50
why NET_EXPORT_PRIVATE and not NET_EXPORT?
Adam Rice
2015/11/09 11:01:21
I was just being conservative. Changed.
|
| + size_t length, |
| + const char* key, |
| + size_t key_length); |
| + |
| +} // namespace net |
| + |
| +#endif // NET_BASE_DAFSA_LOOKUP_STRING_H_ |