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

Unified Diff: chrome/renderer/extensions/user_script_slave.cc

Issue 14651017: Move RuntimeData and related permissions out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_permissions
Patch Set: Latest master Created 7 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 | « chrome/renderer/extensions/user_script_scheduler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3e64b7d63cd304737c241aa6f0b6baaebe070639..1b8e3fe1c1485bc0b6c13bc453fb35ca3dce4114 100644
--- a/chrome/renderer/extensions/user_script_slave.cc
+++ b/chrome/renderer/extensions/user_script_slave.cc
@@ -17,6 +17,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/extension_set.h"
+#include "chrome/common/extensions/permissions/permissions_data.h"
#include "chrome/common/url_constants.h"
#include "chrome/renderer/chrome_render_process_observer.h"
#include "chrome/renderer/extensions/dom_activity_logger.h"
@@ -99,7 +100,7 @@ std::string UserScriptSlave::GetExtensionIdForIsolatedWorld(
void UserScriptSlave::InitializeIsolatedWorld(int isolated_world_id,
const Extension* extension) {
const URLPatternSet& permissions =
- extension->GetEffectiveHostPermissions();
+ PermissionsData::GetEffectiveHostPermissions(extension);
for (URLPatternSet::const_iterator i = permissions.begin();
i != permissions.end(); ++i) {
const char* schemes[] = {
@@ -288,11 +289,12 @@ void UserScriptSlave::InjectScripts(WebFrame* frame,
// Content scripts are not tab-specific.
int kNoTabId = -1;
- if (!extension->CanExecuteScriptOnPage(data_source_url,
- frame->top()->document().url(),
- kNoTabId,
- script,
- NULL)) {
+ if (!PermissionsData::CanExecuteScriptOnPage(extension,
+ data_source_url,
+ frame->top()->document().url(),
+ kNoTabId,
+ script,
+ NULL)) {
continue;
}
« no previous file with comments | « chrome/renderer/extensions/user_script_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698