Chromium Code Reviews| Index: chrome/renderer/extensions/user_script_slave.cc |
| diff --git a/chrome/renderer/extensions/user_script_slave.cc b/chrome/renderer/extensions/user_script_slave.cc |
| index 8862631a2c47999dce84d3bfa23ce8a16df30db2..f1f752aaea5f7dc855db5ce4e70d8e85502fdf4c 100644 |
| --- a/chrome/renderer/extensions/user_script_slave.cc |
| +++ b/chrome/renderer/extensions/user_script_slave.cc |
| @@ -279,8 +279,17 @@ void UserScriptSlave::InjectScripts(WebFrame* frame, |
| if (!extension) |
| continue; |
| - if (!extension->CanExecuteScriptOnPage(data_source_url, script, NULL)) |
| + // Don't consider the tab ID when deciding whether to run content scripts; |
|
Aaron Boodman
2012/06/06 01:03:13
I think this comment can just be:
// Content scri
not at google - send to devlin
2012/06/06 07:38:40
Done.
not at google - send to devlin
2012/06/06 07:38:40
Done.
|
| + // they may be targeted at a specific site, so allowing them to run based |
| + // on the tab would be wrong. |
| + int no_tab_id = -1; |
| + |
| + if (!extension->CanExecuteScriptOnPage(data_source_url, |
| + no_tab_id, |
| + script, |
| + NULL)) { |
| continue; |
| + } |
| // We rely on WebCore for CSS injection, but it's still useful to know how |
| // many css files there are. |