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

Unified Diff: extensions/browser/extension_util.cc

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
« no previous file with comments | « extensions/browser/extension_util.h ('k') | extensions/browser/guest_view/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_util.cc
diff --git a/extensions/browser/extension_util.cc b/extensions/browser/extension_util.cc
index 5ed98fc227f0948c6b7e56a81e0a6523142393ef..13f36055f9b6be569f2d923df490a24c67017f38 100644
--- a/extensions/browser/extension_util.cc
+++ b/extensions/browser/extension_util.cc
@@ -8,6 +8,7 @@
#include "content/public/browser/site_instance.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
+#include "extensions/common/api/declarative_net_request/rules_manifest_info.h"
#include "extensions/common/features/behavior_feature.h"
#include "extensions/common/features/feature.h"
#include "extensions/common/features/feature_provider.h"
@@ -95,5 +96,14 @@ content::StoragePartition* GetStoragePartitionForExtensionId(
return storage_partition;
}
+bool HasIndexedRuleset(const Extension* extension) {
+ // TODO this needs to change, especially once add/remove rules are supported.
+ // This should probably use ExtensionPrefs.
+ // Also, for e.g. this is not true if the extension is not installed yet. But
+ // that can be added as a check as well.
+ return declarative_net_request::RulesManifestData::GetJSONRulesetPath(
+ extension) != nullptr;
+}
+
} // namespace util
} // namespace extensions
« no previous file with comments | « extensions/browser/extension_util.h ('k') | extensions/browser/guest_view/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698