| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/frame/csp/CSPDirectiveList.h" | 6 #include "core/frame/csp/CSPDirectiveList.h" |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/inspector/ConsoleMessage.h" | 10 #include "core/inspector/ConsoleMessage.h" |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 // value1 | 617 // value1 |
| 618 // ^ | 618 // ^ |
| 619 if (equalIgnoringCase("unsafe-url", begin, position - begin)) { | 619 if (equalIgnoringCase("unsafe-url", begin, position - begin)) { |
| 620 m_referrerPolicy = ReferrerPolicyAlways; | 620 m_referrerPolicy = ReferrerPolicyAlways; |
| 621 } else if (equalIgnoringCase("no-referrer", begin, position - begin)) { | 621 } else if (equalIgnoringCase("no-referrer", begin, position - begin)) { |
| 622 m_referrerPolicy = ReferrerPolicyNever; | 622 m_referrerPolicy = ReferrerPolicyNever; |
| 623 } else if (equalIgnoringCase("no-referrer-when-downgrade", begin, position -
begin)) { | 623 } else if (equalIgnoringCase("no-referrer-when-downgrade", begin, position -
begin)) { |
| 624 m_referrerPolicy = ReferrerPolicyDefault; | 624 m_referrerPolicy = ReferrerPolicyDefault; |
| 625 } else if (equalIgnoringCase("origin", begin, position - begin)) { | 625 } else if (equalIgnoringCase("origin", begin, position - begin)) { |
| 626 m_referrerPolicy = ReferrerPolicyOrigin; | 626 m_referrerPolicy = ReferrerPolicyOrigin; |
| 627 } else if (equalIgnoringCase("origin-when-crossorigin", begin, position - be
gin)) { |
| 628 m_referrerPolicy = ReferrerPolicyOriginWhenCrossOrigin; |
| 627 } else { | 629 } else { |
| 628 m_referrerPolicy = ReferrerPolicyNever; | 630 m_referrerPolicy = ReferrerPolicyNever; |
| 629 m_policy->reportInvalidReferrer(value); | 631 m_policy->reportInvalidReferrer(value); |
| 630 return; | 632 return; |
| 631 } | 633 } |
| 632 | 634 |
| 633 skipWhile<UChar, isASCIISpace>(position, end); | 635 skipWhile<UChar, isASCIISpace>(position, end); |
| 634 if (position == end) | 636 if (position == end) |
| 635 return; | 637 return; |
| 636 | 638 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 setCSPDirective<SourceListDirective>(name, value, m_manifestSrc); | 690 setCSPDirective<SourceListDirective>(name, value, m_manifestSrc); |
| 689 else | 691 else |
| 690 m_policy->reportUnsupportedDirective(name); | 692 m_policy->reportUnsupportedDirective(name); |
| 691 } else { | 693 } else { |
| 692 m_policy->reportUnsupportedDirective(name); | 694 m_policy->reportUnsupportedDirective(name); |
| 693 } | 695 } |
| 694 } | 696 } |
| 695 | 697 |
| 696 | 698 |
| 697 } // namespace blink | 699 } // namespace blink |
| OLD | NEW |