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

Side by Side Diff: third_party/WebKit/Source/core/frame/csp/CSPSource.h

Issue 2708873002: Stop CSP from matching independent scheme/port upgrades (Closed)
Patch Set: 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 // 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 #ifndef CSPSource_h 5 #ifndef CSPSource_h
6 #define CSPSource_h 6 #define CSPSource_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/frame/csp/ContentSecurityPolicy.h" 9 #include "core/frame/csp/ContentSecurityPolicy.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, GetSourceVector); 58 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, GetSourceVector);
59 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, OperativeDirectiveGivenType); 59 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, OperativeDirectiveGivenType);
60 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, SubsumesWithSelf); 60 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, SubsumesWithSelf);
61 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetSources); 61 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetSources);
62 62
63 bool schemeMatches(const String&) const; 63 bool schemeMatches(const String&) const;
64 bool hostMatches(const String&) const; 64 bool hostMatches(const String&) const;
65 bool pathMatches(const String&) const; 65 bool pathMatches(const String&) const;
66 // Protocol is necessary to determine default port if it is zero. 66 // Protocol is necessary to determine default port if it is zero.
67 bool portMatches(int port, const String& protocol) const; 67 bool portMatches(int port, const String& protocol) const;
68 bool portAndSchemeUpgradeAllowed(int port, const String& protocol) const;
68 bool isSimilar(CSPSource* other) const; 69 bool isSimilar(CSPSource* other) const;
69 70
70 Member<ContentSecurityPolicy> m_policy; 71 Member<ContentSecurityPolicy> m_policy;
71 String m_scheme; 72 String m_scheme;
72 String m_host; 73 String m_host;
73 int m_port; 74 int m_port;
74 String m_path; 75 String m_path;
75 76
76 WildcardDisposition m_hostWildcard; 77 WildcardDisposition m_hostWildcard;
77 WildcardDisposition m_portWildcard; 78 WildcardDisposition m_portWildcard;
78 }; 79 };
79 80
80 } // namespace blink 81 } // namespace blink
81 82
82 #endif 83 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698