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

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

Issue 2656533004: Remove unused blink::FeaturePolicy class. (Closed)
Patch Set: Rebase Created 3 years, 10 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 WebFeaturePolicy* parentFeaturePolicy = 585 WebFeaturePolicy* parentFeaturePolicy =
586 (isLoadingMainFrame() ? nullptr 586 (isLoadingMainFrame() ? nullptr
587 : m_frame->client() 587 : m_frame->client()
588 ->parent() 588 ->parent()
589 ->securityContext() 589 ->securityContext()
590 ->getFeaturePolicy()); 590 ->getFeaturePolicy());
591 const String& featurePolicyHeader = 591 const String& featurePolicyHeader =
592 m_documentLoader->response().httpHeaderField( 592 m_documentLoader->response().httpHeaderField(
593 HTTPNames::Feature_Policy); 593 HTTPNames::Feature_Policy);
594 Vector<String> messages; 594 Vector<String> messages;
595 const WebParsedFeaturePolicyHeader& parsedHeader = 595 const WebParsedFeaturePolicyHeader& parsedHeader = parseFeaturePolicy(
596 FeaturePolicy::parseFeaturePolicy( 596 featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(),
597 featurePolicyHeader, 597 &messages);
598 m_frame->securityContext()->getSecurityOrigin(), &messages);
599 m_frame->securityContext()->setFeaturePolicyFromHeader( 598 m_frame->securityContext()->setFeaturePolicyFromHeader(
600 parsedHeader, parentFeaturePolicy); 599 parsedHeader, parentFeaturePolicy);
601 for (auto& message : messages) { 600 for (auto& message : messages) {
602 m_frame->document()->addConsoleMessage(ConsoleMessage::create( 601 m_frame->document()->addConsoleMessage(ConsoleMessage::create(
603 OtherMessageSource, ErrorMessageLevel, 602 OtherMessageSource, ErrorMessageLevel,
604 "Error with Feature-Policy header: " + message)); 603 "Error with Feature-Policy header: " + message));
605 } 604 }
606 if (!parsedHeader.isEmpty()) 605 if (!parsedHeader.isEmpty())
607 client()->didSetFeaturePolicyHeader(parsedHeader); 606 client()->didSetFeaturePolicyHeader(parsedHeader);
608 } 607 }
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 frameLoadRequest.clientRedirect()); 2009 frameLoadRequest.clientRedirect());
2011 2010
2012 loader->setLoadType(loadType); 2011 loader->setLoadType(loadType);
2013 loader->setNavigationType(navigationType); 2012 loader->setNavigationType(navigationType);
2014 loader->setReplacesCurrentHistoryItem(loadType == 2013 loader->setReplacesCurrentHistoryItem(loadType ==
2015 FrameLoadTypeReplaceCurrentItem); 2014 FrameLoadTypeReplaceCurrentItem);
2016 return loader; 2015 return loader;
2017 } 2016 }
2018 2017
2019 } // namespace blink 2018 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698