Index: chrome/browser/extensions/api/declarative_content/content_action.h |
diff --git a/chrome/browser/extensions/api/declarative_content/content_action.h b/chrome/browser/extensions/api/declarative_content/content_action.h |
index dc39431aed870bfe65d677064bf23bc30e542a05..93b2cf79960152f5605f5305041ca874419b9836 100644 |
--- a/chrome/browser/extensions/api/declarative_content/content_action.h |
+++ b/chrome/browser/extensions/api/declarative_content/content_action.h |
@@ -95,6 +95,9 @@ class RequestContentScript : public ContentAction { |
public: |
struct ScriptData; |
+ // TODO(hanxi): add RulesRegistryID to the RequestKey. |
+ using RequestKey = std::string; |
+ |
RequestContentScript(content::BrowserContext* browser_context, |
const Extension* extension, |
const ScriptData& script_data); |
@@ -150,6 +153,13 @@ class RequestContentScript : public ContentAction { |
const std::string& extension_id) const; |
UserScript script_; |
+ |
+ // The lifetime of the |master_| is managed by DeclarativeUserScriptManager, |
Devlin
2015/01/21 23:25:20
How about instead
"Since the lifetime of Declarati
Xi Han
2015/01/22 17:19:36
Sounds better, thanks!
|
+ // which manages a map of master objects. |
+ // DeclarativeUserScriptManager is owned by ExtensionSystemImpl::Shared, and a |
+ // master object will only be desctructed when the |
+ // DeclarativeUserScriptManager is desctructed. |
+ // So it is safe to use a raw pointer here. |
DeclarativeUserScriptMaster* master_; |
DISALLOW_COPY_AND_ASSIGN(RequestContentScript); |