| Index: chrome/browser/extensions/api/declarative_content/content_action.cc
|
| diff --git a/chrome/browser/extensions/api/declarative_content/content_action.cc b/chrome/browser/extensions/api/declarative_content/content_action.cc
|
| index 235363ce1d871544fbea5ae7f4492d2b2ec1fe23..b5d76aa42f748b466031555d1d14f3e1dd00d2ec 100644
|
| --- a/chrome/browser/extensions/api/declarative_content/content_action.cc
|
| +++ b/chrome/browser/extensions/api/declarative_content/content_action.cc
|
| @@ -62,7 +62,6 @@ class ShowPageAction : public ContentAction {
|
|
|
| static scoped_refptr<ContentAction> Create(
|
| content::BrowserContext* browser_context,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const base::DictionaryValue* dict,
|
| std::string* error,
|
| @@ -126,7 +125,6 @@ class SetIcon : public ContentAction {
|
|
|
| static scoped_refptr<ContentAction> Create(
|
| content::BrowserContext* browser_context,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const base::DictionaryValue* dict,
|
| std::string* error,
|
| @@ -220,7 +218,6 @@ struct ContentActionFactory {
|
| // not confirm to the validated JSON specification.
|
| typedef scoped_refptr<ContentAction>(*FactoryMethod)(
|
| content::BrowserContext* /* browser_context */,
|
| - const HostID& host_id /* host id */,
|
| const Extension* /* extension */,
|
| const base::DictionaryValue* /* dict */,
|
| std::string* /* error */,
|
| @@ -266,7 +263,6 @@ RequestContentScript::ScriptData::~ScriptData() {}
|
| // static
|
| scoped_refptr<ContentAction> RequestContentScript::Create(
|
| content::BrowserContext* browser_context,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const base::DictionaryValue* dict,
|
| std::string* error,
|
| @@ -277,7 +273,6 @@ scoped_refptr<ContentAction> RequestContentScript::Create(
|
|
|
| return scoped_refptr<ContentAction>(new RequestContentScript(
|
| browser_context,
|
| - host_id,
|
| extension,
|
| script_data));
|
| }
|
| @@ -285,7 +280,6 @@ scoped_refptr<ContentAction> RequestContentScript::Create(
|
| // static
|
| scoped_refptr<ContentAction> RequestContentScript::CreateForTest(
|
| DeclarativeUserScriptMaster* master,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const base::Value& json_action,
|
| std::string* error,
|
| @@ -313,7 +307,6 @@ scoped_refptr<ContentAction> RequestContentScript::CreateForTest(
|
| // using a BrowserContext.
|
| return scoped_refptr<ContentAction>(new RequestContentScript(
|
| master,
|
| - host_id,
|
| extension,
|
| script_data));
|
| }
|
| @@ -355,9 +348,9 @@ bool RequestContentScript::InitScriptData(const base::DictionaryValue* dict,
|
|
|
| RequestContentScript::RequestContentScript(
|
| content::BrowserContext* browser_context,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const ScriptData& script_data) {
|
| + HostID host_id(HostID::EXTENSIONS, extension->id());
|
| InitScript(host_id, extension, script_data);
|
|
|
| master_ = ExtensionSystem::Get(browser_context)
|
| @@ -368,9 +361,9 @@ RequestContentScript::RequestContentScript(
|
|
|
| RequestContentScript::RequestContentScript(
|
| DeclarativeUserScriptMaster* master,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const ScriptData& script_data) {
|
| + HostID host_id(HostID::EXTENSIONS, extension->id());
|
| InitScript(host_id, extension, script_data);
|
|
|
| master_ = master;
|
| @@ -443,7 +436,6 @@ void RequestContentScript::InstructRenderProcessToInject(
|
| // static
|
| scoped_refptr<ContentAction> SetIcon::Create(
|
| content::BrowserContext* browser_context,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const base::DictionaryValue* dict,
|
| std::string* error,
|
| @@ -481,7 +473,6 @@ ContentAction::~ContentAction() {}
|
| // static
|
| scoped_refptr<ContentAction> ContentAction::Create(
|
| content::BrowserContext* browser_context,
|
| - const HostID& host_id,
|
| const Extension* extension,
|
| const base::Value& json_action,
|
| std::string* error,
|
| @@ -497,7 +488,7 @@ scoped_refptr<ContentAction> ContentAction::Create(
|
| factory_method_iter = factory.factory_methods.find(instance_type);
|
| if (factory_method_iter != factory.factory_methods.end())
|
| return (*factory_method_iter->second)(
|
| - browser_context, host_id, extension, action_dict, error, bad_message);
|
| + browser_context, extension, action_dict, error, bad_message);
|
|
|
| *error = base::StringPrintf(kInvalidInstanceTypeError, instance_type.c_str());
|
| return scoped_refptr<ContentAction>();
|
|
|