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

Unified Diff: chrome/browser/extensions/api/debugger/debugger_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/debugger/debugger_api.cc
diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc
index e00cd84c05dd4a0ef6565142abbfcb9ba2be2ded..9dbe9b359e43c5dcbf4f3a511be51167f360d0b8 100644
--- a/chrome/browser/extensions/api/debugger/debugger_api.cc
+++ b/chrome/browser/extensions/api/debugger/debugger_api.cc
@@ -508,7 +508,7 @@ bool DebuggerFunction::InitAgentHost() {
if (result && web_contents) {
// TODO(rdevlin.cronin) This should definitely be GetLastCommittedURL().
GURL url = web_contents->GetVisibleURL();
- if (PermissionsData::IsRestrictedUrl(url, url, extension(), &error_))
+ if (PermissionsData::IsRestrictedUrl(url, extension(), &error_))
return false;
agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents);
}
@@ -518,7 +518,6 @@ bool DebuggerFunction::InitAgentHost() {
->GetBackgroundHostForExtension(*debuggee_.extension_id);
if (extension_host) {
if (PermissionsData::IsRestrictedUrl(extension_host->GetURL(),
- extension_host->GetURL(),
extension(),
&error_)) {
return false;
@@ -530,7 +529,6 @@ bool DebuggerFunction::InitAgentHost() {
agent_host_ = DevToolsAgentHost::GetForId(*debuggee_.target_id);
if (agent_host_.get()) {
if (PermissionsData::IsRestrictedUrl(agent_host_->GetURL(),
- agent_host_->GetURL(),
extension(),
&error_)) {
agent_host_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698