| 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 if (!headerContentLanguage.isEmpty()) { | 573 if (!headerContentLanguage.isEmpty()) { |
| 574 m_frame->document()->setContentLanguage( | 574 m_frame->document()->setContentLanguage( |
| 575 AtomicString(headerContentLanguage)); | 575 AtomicString(headerContentLanguage)); |
| 576 } | 576 } |
| 577 } | 577 } |
| 578 | 578 |
| 579 OriginTrialContext::addTokensFromHeader( | 579 OriginTrialContext::addTokensFromHeader( |
| 580 m_frame->document(), | 580 m_frame->document(), |
| 581 m_documentLoader->response().httpHeaderField(HTTPNames::Origin_Trial)); | 581 m_documentLoader->response().httpHeaderField(HTTPNames::Origin_Trial)); |
| 582 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { | 582 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { |
| 583 FeaturePolicy* parentFeaturePolicy = | 583 WebFeaturePolicy* parentFeaturePolicy = |
| 584 (isLoadingMainFrame() ? nullptr | 584 (isLoadingMainFrame() ? nullptr |
| 585 : m_frame->client() | 585 : m_frame->client() |
| 586 ->parent() | 586 ->parent() |
| 587 ->securityContext() | 587 ->securityContext() |
| 588 ->getFeaturePolicy()); | 588 ->getFeaturePolicy()); |
| 589 const String& featurePolicyHeader = | 589 const String& featurePolicyHeader = |
| 590 m_documentLoader->response().httpHeaderField( | 590 m_documentLoader->response().httpHeaderField( |
| 591 HTTPNames::Feature_Policy); | 591 HTTPNames::Feature_Policy); |
| 592 Vector<String> messages; | 592 Vector<String> messages; |
| 593 const WebParsedFeaturePolicy& parsedHeader = | 593 const WebParsedFeaturePolicyHeader& parsedHeader = parseFeaturePolicy( |
| 594 FeaturePolicy::parseFeaturePolicy( | 594 featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(), |
| 595 featurePolicyHeader, | 595 &messages); |
| 596 m_frame->securityContext()->getSecurityOrigin(), &messages); | |
| 597 m_frame->securityContext()->setFeaturePolicyFromHeader( | 596 m_frame->securityContext()->setFeaturePolicyFromHeader( |
| 598 parsedHeader, parentFeaturePolicy); | 597 parsedHeader, parentFeaturePolicy); |
| 599 for (auto& message : messages) { | 598 for (auto& message : messages) { |
| 600 m_frame->document()->addConsoleMessage(ConsoleMessage::create( | 599 m_frame->document()->addConsoleMessage(ConsoleMessage::create( |
| 601 OtherMessageSource, ErrorMessageLevel, | 600 OtherMessageSource, ErrorMessageLevel, |
| 602 "Error with Feature-Policy header: " + message)); | 601 "Error with Feature-Policy header: " + message)); |
| 603 } | 602 } |
| 604 if (!parsedHeader.isEmpty()) | 603 if (!parsedHeader.isEmpty()) |
| 605 client()->didSetFeaturePolicyHeader(parsedHeader); | 604 client()->didSetFeaturePolicyHeader(parsedHeader); |
| 606 } | 605 } |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1905 m_documentLoader ? m_documentLoader->url() : String()); | 1904 m_documentLoader ? m_documentLoader->url() : String()); |
| 1906 return tracedValue; | 1905 return tracedValue; |
| 1907 } | 1906 } |
| 1908 | 1907 |
| 1909 inline void FrameLoader::takeObjectSnapshot() const { | 1908 inline void FrameLoader::takeObjectSnapshot() const { |
| 1910 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1909 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
| 1911 toTracedValue()); | 1910 toTracedValue()); |
| 1912 } | 1911 } |
| 1913 | 1912 |
| 1914 } // namespace blink | 1913 } // namespace blink |
| OLD | NEW |