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..48f4e72dac9e596bff73614452a2002949b35660 100644 |
--- a/chrome/browser/extensions/api/declarative_content/content_action.h |
+++ b/chrome/browser/extensions/api/declarative_content/content_action.h |
@@ -95,6 +95,15 @@ class RequestContentScript : public ContentAction { |
public: |
struct ScriptData; |
+ // TODO(hanxi): add RulesRegistryID to the RequestKey. |
+ struct RequestKey { |
+ explicit RequestKey(const std::string& host_id) : host_id(host_id) {} |
+ bool operator<(const RequestKey& key) const { |
+ return host_id.compare(key.host_id) < 0; |
+ } |
+ std::string host_id; |
+ }; |
+ |
RequestContentScript(content::BrowserContext* browser_context, |
const Extension* extension, |
const ScriptData& script_data); |
@@ -140,7 +149,7 @@ class RequestContentScript : public ContentAction { |
void InitScript(const Extension* extension, const ScriptData& script_data); |
void AddScript() { |
- DCHECK(master_); |
+ DCHECK(master_.get()); |
master_->AddScript(script_); |
} |
@@ -150,7 +159,7 @@ class RequestContentScript : public ContentAction { |
const std::string& extension_id) const; |
UserScript script_; |
- DeclarativeUserScriptMaster* master_; |
+ linked_ptr<DeclarativeUserScriptMaster> master_; |
Devlin
2015/01/14 16:45:08
I don't think it's wise to make this a linked_ptr.
Xi Han
2015/01/14 23:46:02
linked_ptr was removed from here. Also I have to d
Devlin
2015/01/16 17:05:03
That's my bad - when I say "weak pointer", I mean
Xi Han
2015/01/19 22:40:05
Sounds good:)
|
DISALLOW_COPY_AND_ASSIGN(RequestContentScript); |
}; |