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 12745096ce97ddc4e04a774c9444e306722bae27..2b7006299a22ccf092ead1089d4f07640474cabc 100644
--- a/extensions/renderer/
+++ b/extensions/renderer/
@@ -13,6 +13,7 @@
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebDOMFileSystem.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
+#include "url/origin.h"
namespace extensions {
@@ -42,8 +43,8 @@ void FileSystemNatives::GetIsolatedFileSystem(
- std::string name(storage::GetIsolatedFileSystemName(context_url.GetOrigin(),
- file_system_id));
+ const GURL origin(url::Origin(context_url).Serialize());
+ std::string name(storage::GetIsolatedFileSystemName(origin, file_system_id));
// The optional second argument is the subfolder within the isolated file
// system at which to root the DOMFileSystem we're returning to the caller.
@@ -54,7 +55,7 @@ void FileSystemNatives::GetIsolatedFileSystem(
GURL root_url(storage::GetIsolatedFileSystemRootURIString(
- context_url.GetOrigin(), file_system_id, optional_root_name));
+ origin, file_system_id, optional_root_name));

Powered by Google App Engine
This is Rietveld 408576698