| 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;
|
| }
|
|
|
|
|