| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 5 * Copyright (C) 2009 Google Inc. All rights reserved. | 5 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 28 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 */ | 31 */ |
| 32 | 32 |
| 33 #include "platform/network/HTTPParsers.h" | 33 #include "platform/network/HTTPParsers.h" |
| 34 | 34 |
| 35 #include "platform/ParsingUtilities.h" | 35 #include "platform/ParsingUtilities.h" |
| 36 #include "platform/weborigin/SecurityPolicy.h" |
| 36 #include "platform/weborigin/Suborigin.h" | 37 #include "platform/weborigin/Suborigin.h" |
| 37 #include "wtf/DateMath.h" | 38 #include "wtf/DateMath.h" |
| 38 #include "wtf/MathExtras.h" | 39 #include "wtf/MathExtras.h" |
| 39 #include "wtf/text/CString.h" | 40 #include "wtf/text/CString.h" |
| 40 #include "wtf/text/CharacterNames.h" | 41 #include "wtf/text/CharacterNames.h" |
| 41 #include "wtf/text/StringBuilder.h" | 42 #include "wtf/text/StringBuilder.h" |
| 42 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
| 43 | 44 |
| 44 using namespace WTF; | 45 using namespace WTF; |
| 45 | 46 |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 Suborigin::SuboriginPolicyOptions option = getSuboriginPolicyOptionFromS
tring(optionName); | 742 Suborigin::SuboriginPolicyOptions option = getSuboriginPolicyOptionFromS
tring(optionName); |
| 742 if (option == Suborigin::SuboriginPolicyOptions::None) | 743 if (option == Suborigin::SuboriginPolicyOptions::None) |
| 743 messages.append("Ignoring unknown suborigin policy option " + option
Name + "."); | 744 messages.append("Ignoring unknown suborigin policy option " + option
Name + "."); |
| 744 else | 745 else |
| 745 suborigin->addPolicyOption(option); | 746 suborigin->addPolicyOption(option); |
| 746 } | 747 } |
| 747 | 748 |
| 748 return true; | 749 return true; |
| 749 } | 750 } |
| 750 | 751 |
| 752 // TODO(estark): add parse error messages like suborigins |
| 753 // has. https://crbug.com/621248 |
| 754 ReferrerPolicy parseReferrerPolicyHeader(const String& header) |
| 755 { |
| 756 Vector<String> headers; |
| 757 header.split(',', true, headers); |
| 758 ReferrerPolicy result = ReferrerPolicyDefault; |
| 759 for (const auto& header : headers) { |
| 760 ReferrerPolicy currentResult; |
| 761 if (SecurityPolicy::referrerPolicyFromString(header, ¤tResult)) { |
| 762 result = currentResult; |
| 763 } |
| 764 } |
| 765 return result; |
| 766 } |
| 767 |
| 751 } // namespace blink | 768 } // namespace blink |
| OLD | NEW |