summaryrefslogtreecommitdiffstats
path: root/extensions/renderer
diff options
context:
space:
mode:
authorbattre <battre@chromium.org>2015-11-12 13:25:46 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-12 21:26:57 +0000
commitb807906072e191a10febe3f1e9b9fa46429abff9 (patch)
tree8cc2b40220582871b9014162cf4b1cbd9e370e2d /extensions/renderer
parentd913bfecb178a60b441cb41e4c52262278e61aa5 (diff)
downloadchromium_src-b807906072e191a10febe3f1e9b9fa46429abff9.zip
chromium_src-b807906072e191a10febe3f1e9b9fa46429abff9.tar.gz
chromium_src-b807906072e191a10febe3f1e9b9fa46429abff9.tar.bz2
Remove URLs from chrome.tabs.executeScript permission warning.
This CL removes the URL error messages triggered by chrome.tabs.executeScript when the extension lacks the permission to access the respective host. This is necessary to prevent that an extension can see the list of open URLs of all tabs without having asked for appropriate permission. BUG=551626 Review URL: https://codereview.chromium.org/1414223005 Cr-Commit-Position: refs/heads/master@{#359392}
Diffstat (limited to 'extensions/renderer')
-rw-r--r--extensions/renderer/programmatic_script_injector.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/extensions/renderer/programmatic_script_injector.cc b/extensions/renderer/programmatic_script_injector.cc
index 97d68a6d..8fea5aa 100644
--- a/extensions/renderer/programmatic_script_injector.cc
+++ b/extensions/renderer/programmatic_script_injector.cc
@@ -133,8 +133,11 @@ void ProgrammaticScriptInjector::OnWillNotInject(
manifest_errors::kCannotAccessAboutUrl, url_.spec(),
effective_url_.GetOrigin().spec());
} else {
- error = ErrorUtils::FormatErrorMessage(
- manifest_errors::kCannotAccessPage, url_.spec());
+ // TODO(?) It would be nice to show kCannotAccessPageWithUrl here if
+ // this is triggered by an extension with tabs permission. See
+ // https://codereview.chromium.org/1414223005/diff/1/extensions/
+ // common/manifest_constants.cc#newcode269
+ error = manifest_errors::kCannotAccessPage;
}
break;
case EXTENSION_REMOVED: // no special error here.