Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: extensions/renderer/

Issue 1658913002: Make extensions use a correct same-origin check. (Closed) Base URL:
Patch Set: Respond to comments. Created 4 years, 11 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: extensions/renderer/
diff --git a/extensions/renderer/ b/extensions/renderer/
index f576305a7fa8c604c090a9d7623cfd95a7e09482..13f0a20a7e95c2fbb9f087c9a7d534354fa99f47 100644
--- a/extensions/renderer/
+++ b/extensions/renderer/
@@ -20,6 +20,7 @@
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScriptSource.h"
+#include "url/origin.h"
namespace extensions {
@@ -132,7 +133,7 @@ void ProgrammaticScriptInjector::OnWillNotInject(
if (url_.SchemeIs(url::kAboutScheme)) {
error = ErrorUtils::FormatErrorMessage(
manifest_errors::kCannotAccessAboutUrl, url_.spec(),
- effective_url_.GetOrigin().spec());
+ url::Origin(effective_url_).Serialize());
} else {
// TODO(?) It would be nice to show kCannotAccessPageWithUrl here if
// this is triggered by an extension with tabs permission. See

Powered by Google App Engine
This is Rietveld 408576698