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

Side by Side Diff: Source/core/dom/DocumentInit.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 | « Source/core/dom/DocumentInit.h ('k') | Source/core/dom/SecurityContext.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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ASSERT(frameForSecurityContext()); 124 ASSERT(frameForSecurityContext());
125 return frameForSecurityContext()->loader().shouldEnforceStrictMixedContentCh ecking(); 125 return frameForSecurityContext()->loader().shouldEnforceStrictMixedContentCh ecking();
126 } 126 }
127 127
128 SecurityContext::InsecureRequestsPolicy DocumentInit::insecureRequestsPolicy() c onst 128 SecurityContext::InsecureRequestsPolicy DocumentInit::insecureRequestsPolicy() c onst
129 { 129 {
130 ASSERT(frameForSecurityContext()); 130 ASSERT(frameForSecurityContext());
131 return frameForSecurityContext()->loader().insecureRequestsPolicy(); 131 return frameForSecurityContext()->loader().insecureRequestsPolicy();
132 } 132 }
133 133
134 SecurityContext::InsecureNavigationsSet* DocumentInit::insecureNavigationsToUpgr ade() const
135 {
136 ASSERT(frameForSecurityContext());
137 return frameForSecurityContext()->loader().insecureNavigationsToUpgrade();
138 }
139
134 bool DocumentInit::isHostedInReservedIPRange() const 140 bool DocumentInit::isHostedInReservedIPRange() const
135 { 141 {
136 if (LocalFrame* frame = frameForSecurityContext()) { 142 if (LocalFrame* frame = frameForSecurityContext()) {
137 if (DocumentLoader* loader = frame->loader().provisionalDocumentLoader() ? frame->loader().provisionalDocumentLoader() : frame->loader().documentLoader( )) { 143 if (DocumentLoader* loader = frame->loader().provisionalDocumentLoader() ? frame->loader().provisionalDocumentLoader() : frame->loader().documentLoader( )) {
138 if (!loader->response().remoteIPAddress().isEmpty()) 144 if (!loader->response().remoteIPAddress().isEmpty())
139 return Platform::current()->isReservedIPAddress(loader->response ().remoteIPAddress()); 145 return Platform::current()->isReservedIPAddress(loader->response ().remoteIPAddress());
140 } 146 }
141 } 147 }
142 return false; 148 return false;
143 } 149 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return m_contextDocument; 189 return m_contextDocument;
184 } 190 }
185 191
186 DocumentInit DocumentInit::fromContext(WeakPtrWillBeRawPtr<Document> contextDocu ment, const KURL& url) 192 DocumentInit DocumentInit::fromContext(WeakPtrWillBeRawPtr<Document> contextDocu ment, const KURL& url)
187 { 193 {
188 return DocumentInit(url, 0, contextDocument, 0); 194 return DocumentInit(url, 0, contextDocument, 0);
189 } 195 }
190 196
191 } // namespace blink 197 } // namespace blink
192 198
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentInit.h ('k') | Source/core/dom/SecurityContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698