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

Unified Diff: Source/core/dom/Document.cpp

Issue 1305253012: Allow 'chrome-extension:' URLs to bypass content settings (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | Source/platform/weborigin/SchemeRegistry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index d6c9e8ae39f27940447b603a035a7fae50266572..6f41f1eedf77f83b06581aa506395dde18cf16a0 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3970,6 +3970,9 @@ String Document::lastModified() const
const KURL& Document::firstPartyForCookies() const
{
+ if (SchemeRegistry::shouldTreatURLSchemeAsFirstPartyWhenTopLevel(topDocument().url().protocol()))
+ return topDocument().url();
+
// We're intentionally using the URL of each document rather than the document's SecurityOrigin.
// Sandboxing a document into a unique origin shouldn't effect first-/third-party status for
// cookies and site data.
« no previous file with comments | « no previous file | Source/platform/weborigin/SchemeRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698