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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1775933002: CORS-RFC1918: Pipe creator address space through SharedWorker creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 #include "platform/network/ContentSecurityPolicyParsers.h" 212 #include "platform/network/ContentSecurityPolicyParsers.h"
213 #include "platform/network/HTTPParsers.h" 213 #include "platform/network/HTTPParsers.h"
214 #include "platform/scheduler/CancellableTaskFactory.h" 214 #include "platform/scheduler/CancellableTaskFactory.h"
215 #include "platform/scroll/ScrollbarTheme.h" 215 #include "platform/scroll/ScrollbarTheme.h"
216 #include "platform/text/PlatformLocale.h" 216 #include "platform/text/PlatformLocale.h"
217 #include "platform/text/SegmentedString.h" 217 #include "platform/text/SegmentedString.h"
218 #include "platform/weborigin/OriginAccessEntry.h" 218 #include "platform/weborigin/OriginAccessEntry.h"
219 #include "platform/weborigin/SchemeRegistry.h" 219 #include "platform/weborigin/SchemeRegistry.h"
220 #include "platform/weborigin/SecurityOrigin.h" 220 #include "platform/weborigin/SecurityOrigin.h"
221 #include "public/platform/Platform.h" 221 #include "public/platform/Platform.h"
222 #include "public/platform/WebAddressSpace.h"
222 #include "public/platform/WebFrameScheduler.h" 223 #include "public/platform/WebFrameScheduler.h"
223 #include "public/platform/WebScheduler.h" 224 #include "public/platform/WebScheduler.h"
224 #include "wtf/CurrentTime.h" 225 #include "wtf/CurrentTime.h"
225 #include "wtf/DateMath.h" 226 #include "wtf/DateMath.h"
226 #include "wtf/Functional.h" 227 #include "wtf/Functional.h"
227 #include "wtf/HashFunctions.h" 228 #include "wtf/HashFunctions.h"
228 #include "wtf/MainThread.h" 229 #include "wtf/MainThread.h"
229 #include "wtf/StdLibExtras.h" 230 #include "wtf/StdLibExtras.h"
230 #include "wtf/TemporaryChange.h" 231 #include "wtf/TemporaryChange.h"
231 #include "wtf/text/StringBuffer.h" 232 #include "wtf/text/StringBuffer.h"
(...skipping 4722 matching lines...) Expand 10 before | Expand all | Expand 10 after
4954 setSecurityOrigin(initializer.owner()->securityOrigin()); 4955 setSecurityOrigin(initializer.owner()->securityOrigin());
4955 } else { 4956 } else {
4956 m_cookieURL = m_url; 4957 m_cookieURL = m_url;
4957 setSecurityOrigin(SecurityOrigin::create(m_url)); 4958 setSecurityOrigin(SecurityOrigin::create(m_url));
4958 } 4959 }
4959 4960
4960 // Set the address space before setting up CSP, as the latter may override 4961 // Set the address space before setting up CSP, as the latter may override
4961 // the former via the 'treat-as-public-address' directive (see 4962 // the former via the 'treat-as-public-address' directive (see
4962 // https://mikewest.github.io/cors-rfc1918/#csp). 4963 // https://mikewest.github.io/cors-rfc1918/#csp).
4963 if (initializer.isHostedInReservedIPRange()) { 4964 if (initializer.isHostedInReservedIPRange()) {
4964 setAddressSpace(securityOrigin()->isLocalhost() ? WebURLRequest::Address SpaceLocal : WebURLRequest::AddressSpacePrivate); 4965 setAddressSpace(securityOrigin()->isLocalhost() ? WebAddressSpaceLocal : WebAddressSpacePrivate);
4965 } else { 4966 } else {
4966 setAddressSpace(WebURLRequest::AddressSpacePublic); 4967 setAddressSpace(WebAddressSpacePublic);
4967 } 4968 }
4968 4969
4969 if (importsController()) { 4970 if (importsController()) {
4970 // If this document is an HTML import, grab a reference to it's master d ocument's Content 4971 // If this document is an HTML import, grab a reference to it's master d ocument's Content
4971 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca se, as we can't 4972 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca se, as we can't
4972 // rebind the master document's policy object: its ExecutionContext need s to remain tied 4973 // rebind the master document's policy object: its ExecutionContext need s to remain tied
4973 // to the master document. 4974 // to the master document.
4974 setContentSecurityPolicy(importsController()->master()->contentSecurityP olicy()); 4975 setContentSecurityPolicy(importsController()->master()->contentSecurityP olicy());
4975 } else { 4976 } else {
4976 initContentSecurityPolicy(); 4977 initContentSecurityPolicy();
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
5995 #ifndef NDEBUG 5996 #ifndef NDEBUG
5996 using namespace blink; 5997 using namespace blink;
5997 void showLiveDocumentInstances() 5998 void showLiveDocumentInstances()
5998 { 5999 {
5999 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6000 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6000 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6001 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6001 for (Document* document : set) 6002 for (Document* document : set)
6002 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6003 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6003 } 6004 }
6004 #endif 6005 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698