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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 1150683007: [Extensions] Use document url (not top url) for tab-specific permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 0e762ea5d1bdbed7f0082942d1f4f6c4cf46f302..72795ac087f40441e959bdbd182c6e2584534144 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1275,7 +1275,6 @@ bool TabsUpdateFunction::UpdateURL(const std::string &url_string,
if (!extension()->permissions_data()->CanAccessPage(
extension(),
web_contents_->GetURL(),
- web_contents_->GetURL(),
tab_id,
process ? process->GetID() : -1,
&error_)) {
@@ -1799,7 +1798,6 @@ bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() {
if (!extension()->permissions_data()->CanAccessPage(
extension(),
contents->GetURL(),
- contents->GetURL(),
execute_tab_id_,
process ? process->GetID() : -1,
&error_)) {
@@ -1887,7 +1885,7 @@ bool TabsSetZoomFunction::RunAsync() {
return false;
GURL url(web_contents->GetVisibleURL());
- if (PermissionsData::IsRestrictedUrl(url, url, extension(), &error_))
+ if (PermissionsData::IsRestrictedUrl(url, extension(), &error_))
return false;
ZoomController* zoom_controller =
@@ -1939,7 +1937,7 @@ bool TabsSetZoomSettingsFunction::RunAsync() {
return false;
GURL url(web_contents->GetVisibleURL());
- if (PermissionsData::IsRestrictedUrl(url, url, extension(), &error_))
+ if (PermissionsData::IsRestrictedUrl(url, extension(), &error_))
return false;
// "per-origin" scope is only available in "automatic" mode.

Powered by Google App Engine
This is Rietveld 408576698