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

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

Issue 811773002: Mixed Content: Implement strict mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tests. Created 6 years 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 4759 matching lines...) Expand 10 before | Expand all | Expand 10 after
4770 m_cookieURL = KURL(ParsedURLString, emptyString()); 4770 m_cookieURL = KURL(ParsedURLString, emptyString());
4771 setSecurityOrigin(SecurityOrigin::createUnique()); 4771 setSecurityOrigin(SecurityOrigin::createUnique());
4772 initContentSecurityPolicy(); 4772 initContentSecurityPolicy();
4773 return; 4773 return;
4774 } 4774 }
4775 4775
4776 // In the common case, create the security context from the currently 4776 // In the common case, create the security context from the currently
4777 // loading URL with a fresh content security policy. 4777 // loading URL with a fresh content security policy.
4778 m_cookieURL = m_url; 4778 m_cookieURL = m_url;
4779 enforceSandboxFlags(initializer.sandboxFlags()); 4779 enforceSandboxFlags(initializer.sandboxFlags());
4780 if (initializer.shouldEnforceStrictMixedContentChecking())
4781 enforceStrictMixedContentChecking();
4780 setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique( ) : SecurityOrigin::create(m_url)); 4782 setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique( ) : SecurityOrigin::create(m_url));
4781 4783
4782 if (importsController()) { 4784 if (importsController()) {
4783 // If this document is an HTML import, grab a reference to it's master d ocument's Content 4785 // If this document is an HTML import, grab a reference to it's master d ocument's Content
4784 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca se, as we can't 4786 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca se, as we can't
4785 // rebind the master document's policy object: its ExecutionContext need s to remain tied 4787 // rebind the master document's policy object: its ExecutionContext need s to remain tied
4786 // to the master document. 4788 // to the master document.
4787 setContentSecurityPolicy(importsController()->master()->contentSecurityP olicy()); 4789 setContentSecurityPolicy(importsController()->master()->contentSecurityP olicy());
4788 } else { 4790 } else {
4789 initContentSecurityPolicy(); 4791 initContentSecurityPolicy();
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 #ifndef NDEBUG 5838 #ifndef NDEBUG
5837 using namespace blink; 5839 using namespace blink;
5838 void showLiveDocumentInstances() 5840 void showLiveDocumentInstances()
5839 { 5841 {
5840 WeakDocumentSet& set = liveDocumentSet(); 5842 WeakDocumentSet& set = liveDocumentSet();
5841 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5843 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5842 for (Document* document : set) 5844 for (Document* document : set)
5843 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5845 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5844 } 5846 }
5845 #endif 5847 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698