| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
| 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 m_documentLoader->response().httpHeaderField(HTTPNames::Origin_Trial)); | 578 m_documentLoader->response().httpHeaderField(HTTPNames::Origin_Trial)); |
| 579 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { | 579 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { |
| 580 SecurityContext* parentSecurityContext = | 580 SecurityContext* parentSecurityContext = |
| 581 (isLoadingMainFrame() | 581 (isLoadingMainFrame() |
| 582 ? nullptr | 582 ? nullptr |
| 583 : m_frame->client()->parent()->securityContext()); | 583 : m_frame->client()->parent()->securityContext()); |
| 584 const String& featurePolicyHeader = | 584 const String& featurePolicyHeader = |
| 585 m_documentLoader->response().httpHeaderField( | 585 m_documentLoader->response().httpHeaderField( |
| 586 HTTPNames::Feature_Policy); | 586 HTTPNames::Feature_Policy); |
| 587 Vector<String> messages; | 587 Vector<String> messages; |
| 588 const WebVector<WebFeaturePolicy::ParsedWhitelist>& |
| 589 parsedFeaturePolicyHeaders = FeaturePolicy::parseFeaturePolicy( |
| 590 featurePolicyHeader, |
| 591 m_frame->securityContext()->getSecurityOrigin(), &messages); |
| 588 m_frame->securityContext()->setFeaturePolicyFromHeader( | 592 m_frame->securityContext()->setFeaturePolicyFromHeader( |
| 589 featurePolicyHeader, parentSecurityContext, &messages); | 593 parsedFeaturePolicyHeaders, parentSecurityContext); |
| 590 for (auto& message : messages) { | 594 for (auto& message : messages) { |
| 591 m_frame->document()->addConsoleMessage(ConsoleMessage::create( | 595 m_frame->document()->addConsoleMessage(ConsoleMessage::create( |
| 592 OtherMessageSource, ErrorMessageLevel, | 596 OtherMessageSource, ErrorMessageLevel, |
| 593 "Error with Feature-Policy header: " + message)); | 597 "Error with Feature-Policy header: " + message)); |
| 594 } | 598 } |
| 595 if (client() && !featurePolicyHeader.isEmpty()) | 599 if (client() && !parsedFeaturePolicyHeaders.isEmpty()) |
| 596 client()->didSetFeaturePolicyHeader(featurePolicyHeader); | 600 client()->didSetFeaturePolicyHeader(parsedFeaturePolicyHeaders); |
| 597 } | 601 } |
| 598 } | 602 } |
| 599 | 603 |
| 600 if (m_documentLoader) { | 604 if (m_documentLoader) { |
| 601 String referrerPolicyHeader = m_documentLoader->response().httpHeaderField( | 605 String referrerPolicyHeader = m_documentLoader->response().httpHeaderField( |
| 602 HTTPNames::Referrer_Policy); | 606 HTTPNames::Referrer_Policy); |
| 603 if (!referrerPolicyHeader.isNull()) { | 607 if (!referrerPolicyHeader.isNull()) { |
| 604 m_frame->document()->parseAndSetReferrerPolicy(referrerPolicyHeader); | 608 m_frame->document()->parseAndSetReferrerPolicy(referrerPolicyHeader); |
| 605 } | 609 } |
| 606 } | 610 } |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1950 m_documentLoader ? m_documentLoader->url() : String()); | 1954 m_documentLoader ? m_documentLoader->url() : String()); |
| 1951 return tracedValue; | 1955 return tracedValue; |
| 1952 } | 1956 } |
| 1953 | 1957 |
| 1954 inline void FrameLoader::takeObjectSnapshot() const { | 1958 inline void FrameLoader::takeObjectSnapshot() const { |
| 1955 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1959 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
| 1956 toTracedValue()); | 1960 toTracedValue()); |
| 1957 } | 1961 } |
| 1958 | 1962 |
| 1959 } // namespace blink | 1963 } // namespace blink |
| OLD | NEW |