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

Unified Diff: chrome/browser/extensions/active_script_controller.cc

Issue 309533007: Refactor PermissionsData pt1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: chrome/browser/extensions/active_script_controller.cc
diff --git a/chrome/browser/extensions/active_script_controller.cc b/chrome/browser/extensions/active_script_controller.cc
index 822977d9d67b6d9cf3eee8cd6ca83e212cb03f75..19afff5701594c4973e37f2498d797182913ac8d 100644
--- a/chrome/browser/extensions/active_script_controller.cc
+++ b/chrome/browser/extensions/active_script_controller.cc
@@ -73,10 +73,11 @@ ActiveScriptController* ActiveScriptController::GetForWebContents(
bool ActiveScriptController::RequiresUserConsentForScriptInjection(
const Extension* extension) {
CHECK(extension);
- if (!PermissionsData::RequiresActionForScriptExecution(
- extension,
- SessionID::IdForTab(web_contents()),
- web_contents()->GetVisibleURL()) ||
+ if (!PermissionsData::ForExtension(extension)
+ ->RequiresActionForScriptExecution(
+ extension,
+ SessionID::IdForTab(web_contents()),
+ web_contents()->GetVisibleURL()) ||
util::AllowedScriptingOnAllUrls(extension->id(),
web_contents()->GetBrowserContext())) {
return false;

Powered by Google App Engine
This is Rietveld 408576698