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

Unified Diff: net/base/dafsa/lookup_string.h

Issue 1303973009: [DO NOT COMMIT] Re-use the dafsa code for s-w-r histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply changes by tyoshino. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
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..4f85466045dac0f5b1addaf7a606812760298e14
--- /dev/null
+++ b/net/base/dafsa/lookup_string.h
@@ -0,0 +1,26 @@
+// 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>
+
+namespace net {
+
+const int kNotFound = -1;
+const int kExceptionRule = 1;
+const int kWildcardRule = 2;
+const int kPrivateRule = 4;
tyoshino (SeeGerritForStatus) 2015/10/30 06:29:59 Now these constants are moved out of the anonymous
Adam Rice 2015/11/02 13:53:54 I added "Dafsa" to each of the names. It's a bit u
+
+// Lookup a domain key in a byte array |graph| generated by make_dafsa.py.
+// The rule type is returned if |key| is found, otherwise kNotFound is returned.
+int LookupStringInDafsa(const unsigned char* graph,
+ size_t length,
+ const char* key,
+ size_t key_length);
+
+} // namespace net
+
+#endif // NET_BASE_DAFSA_LOOKUP_STRING_H_

Powered by Google App Engine
This is Rietveld 408576698