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

Unified Diff: extensions/renderer/script_injection.cc

Issue 315573003: Remove PermissionsData::ForExtension() completely (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/user_script_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_injection.cc
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index 5299bd401bc1005f629649bf72c662749f57892f..c7eb9a4183fea8544985ae4837cfe96b5c8f7645 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -154,10 +154,8 @@ void ScriptInjection::InjectIfAllowed(blink::WebFrame* frame,
// valid tab id (if we don't have a tab id, we have no UI surface to ask for
// user consent).
if (tab_id != -1 &&
- PermissionsData::ForExtension(extension)
- ->RequiresActionForScriptExecution(extension,
- tab_id,
- frame->top()->document().url())) {
+ extension->permissions_data()->RequiresActionForScriptExecution(
+ extension, tab_id, frame->top()->document().url())) {
int64 request_id = kInvalidRequestId;
int page_id = top_render_view->GetPageId();
@@ -256,14 +254,14 @@ bool ScriptInjection::WantsToRun(blink::WebFrame* frame,
GURL effective_document_url = ScriptContext::GetEffectiveDocumentURL(
frame, document_url, script_->match_about_blank());
- if (!PermissionsData::ForExtension(extension)
- ->CanExecuteScriptOnPage(extension,
- effective_document_url,
- frame->top()->document().url(),
- kNoTabId,
- script_.get(),
- kNoProcessId,
- NULL /* ignore error */)) {
+ if (!extension->permissions_data()->CanExecuteScriptOnPage(
+ extension,
+ effective_document_url,
+ frame->top()->document().url(),
+ kNoTabId,
+ script_.get(),
+ kNoProcessId,
+ NULL /* ignore error */)) {
return false;
}
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/user_script_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698