Chromium Code Reviews| 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..67ee47923d27700317730bb9d81211cbd47e964c 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 { |
|
Devlin
2015/01/20 17:51:05
Could we instead just use a std::string for this?
Xi Han
2015/01/21 21:30:16
Ok, I will change it to std::string, and change it
|
| + 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); |
| @@ -150,6 +159,8 @@ class RequestContentScript : public ContentAction { |
| const std::string& extension_id) const; |
| UserScript script_; |
| + // The lifetime of the master_ is managed by DeclarativeUserScriptManager, |
|
Devlin
2015/01/20 17:51:05
nit: newline before this.
nit: Document why the li
Xi Han
2015/01/21 21:30:16
Lifetime is hard to explain, so I try my best to a
|
| + // which manages a map of master objects. |
| DeclarativeUserScriptMaster* master_; |
| DISALLOW_COPY_AND_ASSIGN(RequestContentScript); |