Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7022)

Unified Diff: chrome/renderer/user_script_slave.cc

Issue 6242010: Refactor away most of ExtensionRendererInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove more deadness Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/renderer/render_view.cc ('K') | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/user_script_slave.cc
diff --git a/chrome/renderer/user_script_slave.cc b/chrome/renderer/user_script_slave.cc
index c047e05f29d0dc3a7f8b7f94cd0aa62a2a4087c0..fe6b99f33963cf0db8da43a48a70a0835a313bd1 100644
--- a/chrome/renderer/user_script_slave.cc
+++ b/chrome/renderer/user_script_slave.cc
@@ -203,22 +203,16 @@ void UserScriptSlave::InjectScripts(WebFrame* frame,
if (frame->parent() && !script->match_all_frames())
continue; // Only match subframes if the script declared it wanted to.
- ExtensionRendererInfo* extension =
- ExtensionRendererInfo::GetByID(script->extension_id());
+ scoped_refptr<const Extension> extension =
Matt Perry 2011/01/24 20:08:34 raw ptr
Aaron Boodman 2011/01/25 00:27:33 Done.
+ RenderThread::current()->extensions()->GetByID(script->extension_id());
// Since extension info is sent separately from user script info, they can
// be out of sync. We just ignore this situation.
if (!extension)
continue;
- if (!Extension::CanExecuteScriptOnPage(
- frame_url,
- extension->allowed_to_execute_script_everywhere(),
- NULL,
- script,
- NULL)) {
+ if (!extension->CanExecuteScriptOnPage(frame_url, script, NULL))
continue;
- }
if (frame_url.SchemeIsFile() && !script->allow_file_access())
continue; // This script isn't allowed to run on file URLs.
« chrome/renderer/render_view.cc ('K') | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698