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

Unified Diff: extensions/common/api/declarative_net_request/rules_indexer_util.h

Issue 2881453002: DNR Prototype: With flatbuffers
Patch Set: -- Created 3 years, 6 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: extensions/common/api/declarative_net_request/rules_indexer_util.h
diff --git a/extensions/common/api/declarative_net_request/rules_indexer_util.h b/extensions/common/api/declarative_net_request/rules_indexer_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..76ec20ec09f117e7e36a86e0c672e217fb948b7d
--- /dev/null
+++ b/extensions/common/api/declarative_net_request/rules_indexer_util.h
@@ -0,0 +1,28 @@
+// Copyright 2017 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.
+
+#include <string>
+#include <utility>
+
+#include "extensions/common/api/declarative_net_request/constants.h"
+
+#ifndef EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_INDEXER_UTIL_H_
+#define EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_INDEXER_UTIL_H_
+
+namespace base {
+class FilePath;
+}
+
+namespace extensions {
+namespace declarative_net_request {
+
+// This must be called on a thread where file IO is allowed.
+bool IndexAndPersistRuleset(const base::FilePath& json_rules_path,
+ const base::FilePath& indexed_ruleset_path,
+ std::string* error);
+
+} // namespace declarative_net_request
+} // namespace extensions
+
+#endif // EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_INDEXER_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698