| 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
|
|
|