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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2656533004: Remove unused blink::FeaturePolicy class. (Closed)
Patch Set: Rebase before commit 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) 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 WebFeaturePolicy* parentFeaturePolicy = 586 WebFeaturePolicy* parentFeaturePolicy =
587 (isLoadingMainFrame() ? nullptr 587 (isLoadingMainFrame() ? nullptr
588 : m_frame->client() 588 : m_frame->client()
589 ->parent() 589 ->parent()
590 ->securityContext() 590 ->securityContext()
591 ->getFeaturePolicy()); 591 ->getFeaturePolicy());
592 const String& featurePolicyHeader = 592 const String& featurePolicyHeader =
593 m_documentLoader->response().httpHeaderField( 593 m_documentLoader->response().httpHeaderField(
594 HTTPNames::Feature_Policy); 594 HTTPNames::Feature_Policy);
595 Vector<String> messages; 595 Vector<String> messages;
596 const WebParsedFeaturePolicyHeader& parsedHeader = 596 const WebParsedFeaturePolicyHeader& parsedHeader = parseFeaturePolicy(
597 FeaturePolicy::parseFeaturePolicy( 597 featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(),
598 featurePolicyHeader, 598 &messages);
599 m_frame->securityContext()->getSecurityOrigin(), &messages);
600 m_frame->securityContext()->initializeFeaturePolicy(parsedHeader, 599 m_frame->securityContext()->initializeFeaturePolicy(parsedHeader,
601 parentFeaturePolicy); 600 parentFeaturePolicy);
602 for (auto& message : messages) { 601 for (auto& message : messages) {
603 m_frame->document()->addConsoleMessage(ConsoleMessage::create( 602 m_frame->document()->addConsoleMessage(ConsoleMessage::create(
604 OtherMessageSource, ErrorMessageLevel, 603 OtherMessageSource, ErrorMessageLevel,
605 "Error with Feature-Policy header: " + message)); 604 "Error with Feature-Policy header: " + message));
606 } 605 }
607 if (!parsedHeader.isEmpty()) 606 if (!parsedHeader.isEmpty())
608 client()->didSetFeaturePolicyHeader(parsedHeader); 607 client()->didSetFeaturePolicyHeader(parsedHeader);
609 } 608 }
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 frameLoadRequest.clientRedirect()); 1975 frameLoadRequest.clientRedirect());
1977 1976
1978 loader->setLoadType(loadType); 1977 loader->setLoadType(loadType);
1979 loader->setNavigationType(navigationType); 1978 loader->setNavigationType(navigationType);
1980 loader->setReplacesCurrentHistoryItem(loadType == 1979 loader->setReplacesCurrentHistoryItem(loadType ==
1981 FrameLoadTypeReplaceCurrentItem); 1980 FrameLoadTypeReplaceCurrentItem);
1982 return loader; 1981 return loader;
1983 } 1982 }
1984 1983
1985 } // namespace blink 1984 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698