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

Unified Diff: extensions/renderer/script_context.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan Created 4 years, 1 month 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
« no previous file with comments | « extensions/common/url_pattern.cc ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 0dff2e5131cc9cadbff05f38487ce48f86d99194..9b791f3e1234833c7eee521ceba1d1d585325756 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -132,7 +132,8 @@ bool ScriptContext::IsSandboxedPage(const GURL& url) {
const Extension* extension =
RendererExtensionRegistry::Get()->GetByID(url.host());
if (extension) {
- return SandboxedPageInfo::IsSandboxedPage(extension, url.path());
+ return SandboxedPageInfo::IsSandboxedPage(extension,
+ url.path().as_string());
}
}
return false;
@@ -402,8 +403,8 @@ bool ScriptContext::HasAccessOrThrowError(const std::string& name) {
//
// [1] citation needed. This ScriptContext should already be in a state that
// doesn't allow this, from ScriptContextSet::ClassifyJavaScriptContext.
- if (extension() &&
- SandboxedPageInfo::IsSandboxedPage(extension(), url_.path())) {
+ if (extension() && SandboxedPageInfo::IsSandboxedPage(
+ extension(), url_.path().as_string())) {
static const char kMessage[] =
"%s cannot be used within a sandboxed frame.";
std::string error_msg = base::StringPrintf(kMessage, name.c_str());
« no previous file with comments | « extensions/common/url_pattern.cc ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698