Index: extensions/browser/api/declarative/rules_registry_service.h |
diff --git a/extensions/browser/api/declarative/rules_registry_service.h b/extensions/browser/api/declarative/rules_registry_service.h |
index f03adbad7f5b3f1ade92989e3b8879e86e7d0e32..8f16cb2a530ea7778fce779fe6049da72e6ebc24 100644 |
--- a/extensions/browser/api/declarative/rules_registry_service.h |
+++ b/extensions/browser/api/declarative/rules_registry_service.h |
@@ -61,9 +61,15 @@ class RulesRegistryService : public BrowserContextKeyedAPI, |
static BrowserContextKeyedAPIFactory<RulesRegistryService>* |
GetFactoryInstance(); |
- // Convenience method to get the RulesRegistryService for a context. |
+ // Convenience method to get the RulesRegistryService for a context. If a |
+ // RulesRegistryService does not already exist for |context|, one will be |
+ // created and returned. |
static RulesRegistryService* Get(content::BrowserContext* context); |
+ // The same as Get(), except that if a RulesRegistryService does not already |
+ // exist for |context|, nullptr is returned. |
+ static RulesRegistryService* GetIfExists(content::BrowserContext* context); |
+ |
int GetNextRulesRegistryID(); |
// Registers the default RulesRegistries used in Chromium. |