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

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

Issue 978323002: Upgrade insecure requests: Pipe navigational hosts down into nested documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/DocumentInit.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4655 matching lines...) Expand 10 before | Expand all | Expand 10 after
4666 return; 4666 return;
4667 } 4667 }
4668 4668
4669 // In the common case, create the security context from the currently 4669 // In the common case, create the security context from the currently
4670 // loading URL with a fresh content security policy. 4670 // loading URL with a fresh content security policy.
4671 m_cookieURL = m_url; 4671 m_cookieURL = m_url;
4672 enforceSandboxFlags(initializer.sandboxFlags()); 4672 enforceSandboxFlags(initializer.sandboxFlags());
4673 if (initializer.shouldEnforceStrictMixedContentChecking()) 4673 if (initializer.shouldEnforceStrictMixedContentChecking())
4674 enforceStrictMixedContentChecking(); 4674 enforceStrictMixedContentChecking();
4675 setInsecureRequestsPolicy(initializer.insecureRequestsPolicy()); 4675 setInsecureRequestsPolicy(initializer.insecureRequestsPolicy());
4676 if (initializer.insecureNavigationsToUpgrade()) {
4677 for (auto toUpgrade : *initializer.insecureNavigationsToUpgrade())
4678 addInsecureNavigationUpgrade(toUpgrade);
4679 }
4676 setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique( ) : SecurityOrigin::create(m_url)); 4680 setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique( ) : SecurityOrigin::create(m_url));
4677 4681
4678 if (importsController()) { 4682 if (importsController()) {
4679 // If this document is an HTML import, grab a reference to it's master d ocument's Content 4683 // If this document is an HTML import, grab a reference to it's master d ocument's Content
4680 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca se, as we can't 4684 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca se, as we can't
4681 // rebind the master document's policy object: its ExecutionContext need s to remain tied 4685 // rebind the master document's policy object: its ExecutionContext need s to remain tied
4682 // to the master document. 4686 // to the master document.
4683 setContentSecurityPolicy(importsController()->master()->contentSecurityP olicy()); 4687 setContentSecurityPolicy(importsController()->master()->contentSecurityP olicy());
4684 } else { 4688 } else {
4685 initContentSecurityPolicy(); 4689 initContentSecurityPolicy();
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
5722 #ifndef NDEBUG 5726 #ifndef NDEBUG
5723 using namespace blink; 5727 using namespace blink;
5724 void showLiveDocumentInstances() 5728 void showLiveDocumentInstances()
5725 { 5729 {
5726 WeakDocumentSet& set = liveDocumentSet(); 5730 WeakDocumentSet& set = liveDocumentSet();
5727 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5731 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5728 for (Document* document : set) 5732 for (Document* document : set)
5729 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5733 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5730 } 5734 }
5731 #endif 5735 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/DocumentInit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698