| Index: extensions/renderer/user_script_injector.cc
|
| diff --git a/extensions/renderer/user_script_injector.cc b/extensions/renderer/user_script_injector.cc
|
| index f653cf4b792327763d2609181802f725bad47bcb..1910548ba24b340d720cd7eb4ea16d8af38e6416 100644
|
| --- a/extensions/renderer/user_script_injector.cc
|
| +++ b/extensions/renderer/user_script_injector.cc
|
| @@ -197,8 +197,7 @@
|
| }
|
|
|
| std::vector<blink::WebScriptSource> UserScriptInjector::GetJsSources(
|
| - UserScript::RunLocation run_location,
|
| - ScriptsRunInfo* scripts_run_info) const {
|
| + UserScript::RunLocation run_location) const {
|
| std::vector<blink::WebScriptSource> sources;
|
| if (!script_)
|
| return sources;
|
| @@ -210,11 +209,6 @@
|
| for (UserScript::FileList::const_iterator iter = js_scripts.begin();
|
| iter != js_scripts.end();
|
| ++iter) {
|
| - const GURL& script_url = iter->url();
|
| - // Check if the script is already injected.
|
| - if (scripts_run_info->injected_scripts.count(script_url) != 0)
|
| - continue;
|
| -
|
| std::string content = iter->GetContent().as_string();
|
|
|
| // We add this dumb function wrapper for user scripts to emulate what
|
| @@ -224,9 +218,7 @@
|
| content += kUserScriptTail;
|
| }
|
| sources.push_back(blink::WebScriptSource(
|
| - blink::WebString::fromUTF8(content), script_url));
|
| -
|
| - scripts_run_info->injected_scripts.insert(script_url);
|
| + blink::WebString::fromUTF8(content), iter->url()));
|
| }
|
|
|
| // Emulate Greasemonkey API for scripts that were converted to extension
|
| @@ -238,8 +230,7 @@
|
| }
|
|
|
| std::vector<std::string> UserScriptInjector::GetCssSources(
|
| - UserScript::RunLocation run_location,
|
| - ScriptsRunInfo* scripts_run_info) const {
|
| + UserScript::RunLocation run_location) const {
|
| DCHECK_EQ(UserScript::DOCUMENT_START, run_location);
|
|
|
| std::vector<std::string> sources;
|
| @@ -247,18 +238,10 @@
|
| return sources;
|
|
|
| const UserScript::FileList& css_scripts = script_->css_scripts();
|
| -
|
| for (UserScript::FileList::const_iterator iter = css_scripts.begin();
|
| iter != css_scripts.end();
|
| ++iter) {
|
| - const GURL& script_url = iter->url();
|
| - // Check if the stylesheet is already injected.
|
| - if (scripts_run_info->injected_scripts.find(script_url) ==
|
| - scripts_run_info->injected_scripts.end()) {
|
| - sources.push_back(iter->GetContent().as_string());
|
| -
|
| - scripts_run_info->injected_scripts.insert(script_url);
|
| - }
|
| + sources.push_back(iter->GetContent().as_string());
|
| }
|
| return sources;
|
| }
|
|
|