| 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_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RequestContentScript);
|
| };
|
|
|