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

Unified Diff: trunk/src/extensions/common/permissions/permissions_data.cc

Issue 307933008: Revert 273866 "Block content scripts from executing until user g..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
« no previous file with comments | « trunk/src/extensions/common/extension_messages.h ('k') | trunk/src/extensions/common/user_script.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/extensions/common/permissions/permissions_data.cc
===================================================================
--- trunk/src/extensions/common/permissions/permissions_data.cc (revision 274101)
+++ trunk/src/extensions/common/permissions/permissions_data.cc (working copy)
@@ -584,13 +584,12 @@
int tab_id,
const GURL& url) {
// For now, the user should be notified when an extension with all hosts
- // permission tries to execute a script on a page. Exceptions for policy-
- // enabled and component extensions, and extensions which are whitelisted to
- // execute scripts everywhere.
+ // permission tries to execute a script on a page, with exceptions for policy-
+ // enabled and component extensions. If this doesn't meet those criteria,
+ // return immediately.
if (!extension->ShouldDisplayInExtensionSettings() ||
Manifest::IsPolicyLocation(extension->location()) ||
Manifest::IsComponentLocation(extension->location()) ||
- CanExecuteScriptEverywhere(extension) ||
!ShouldWarnAllHosts(extension)) {
return false;
}
« no previous file with comments | « trunk/src/extensions/common/extension_messages.h ('k') | trunk/src/extensions/common/user_script.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698