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

Side by Side Diff: Source/core/frame/csp/CSPDirectiveList.cpp

Issue 736233004: Referrer Policy: Introduce "Origin When Cross-Origin". [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Feedback. Created 6 years, 1 month 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/platform/weborigin/ReferrerPolicy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/platform/weborigin/ReferrerPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698