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

Side by Side Diff: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp

Issue 2764993002: CSP: group policies in didAddContentSecurityPolicy. (Closed)
Patch Set: CSP send policies in didAddContentSecurityPolicy one by one. Created 3 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) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 void LocalFrameClientImpl::didSetFeaturePolicyHeader( 914 void LocalFrameClientImpl::didSetFeaturePolicyHeader(
915 const WebParsedFeaturePolicy& parsedHeader) { 915 const WebParsedFeaturePolicy& parsedHeader) {
916 if (m_webFrame->client()) 916 if (m_webFrame->client())
917 m_webFrame->client()->didSetFeaturePolicyHeader(parsedHeader); 917 m_webFrame->client()->didSetFeaturePolicyHeader(parsedHeader);
918 } 918 }
919 919
920 void LocalFrameClientImpl::didAddContentSecurityPolicy( 920 void LocalFrameClientImpl::didAddContentSecurityPolicy(
921 const String& headerValue, 921 const String& headerValue,
922 ContentSecurityPolicyHeaderType type, 922 ContentSecurityPolicyHeaderType type,
923 ContentSecurityPolicyHeaderSource source, 923 ContentSecurityPolicyHeaderSource source,
924 const std::vector<WebContentSecurityPolicyPolicy>& policies) { 924 const WebContentSecurityPolicyPolicy& policy) {
925 if (m_webFrame->client()) { 925 if (m_webFrame->client()) {
926 m_webFrame->client()->didAddContentSecurityPolicy( 926 m_webFrame->client()->didAddContentSecurityPolicy(
927 headerValue, static_cast<WebContentSecurityPolicyType>(type), 927 headerValue, static_cast<WebContentSecurityPolicyType>(type),
928 static_cast<WebContentSecurityPolicySource>(source), policies); 928 static_cast<WebContentSecurityPolicySource>(source), policy);
929 } 929 }
930 } 930 }
931 931
932 void LocalFrameClientImpl::didChangeFrameOwnerProperties( 932 void LocalFrameClientImpl::didChangeFrameOwnerProperties(
933 HTMLFrameElementBase* frameElement) { 933 HTMLFrameElementBase* frameElement) {
934 if (!m_webFrame->client()) 934 if (!m_webFrame->client())
935 return; 935 return;
936 936
937 m_webFrame->client()->didChangeFrameOwnerProperties( 937 m_webFrame->client()->didChangeFrameOwnerProperties(
938 WebFrame::fromFrame(frameElement->contentFrame()), 938 WebFrame::fromFrame(frameElement->contentFrame()),
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 1030 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
1031 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 1031 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
1032 } 1032 }
1033 1033
1034 void LocalFrameClientImpl::setHasReceivedUserGesture() { 1034 void LocalFrameClientImpl::setHasReceivedUserGesture() {
1035 if (m_webFrame->client()) 1035 if (m_webFrame->client())
1036 m_webFrame->client()->setHasReceivedUserGesture(); 1036 m_webFrame->client()->setHasReceivedUserGesture();
1037 } 1037 }
1038 1038
1039 } // namespace blink 1039 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698