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

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

Issue 2025633002: Move 'ContentSecurityPolicy::RedirectStatus' into 'ResourceRequest' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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"
11 #include "platform/network/ResourceRequest.h"
11 #include "wtf/Allocator.h" 12 #include "wtf/Allocator.h"
12 #include "wtf/text/WTFString.h" 13 #include "wtf/text/WTFString.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class ContentSecurityPolicy; 17 class ContentSecurityPolicy;
17 class KURL; 18 class KURL;
18 19
19 class CORE_EXPORT CSPSource : public GarbageCollectedFinalized<CSPSource> { 20 class CORE_EXPORT CSPSource : public GarbageCollectedFinalized<CSPSource> {
20 public: 21 public:
21 enum WildcardDisposition { 22 enum WildcardDisposition {
22 HasWildcard, 23 HasWildcard,
23 NoWildcard 24 NoWildcard
24 }; 25 };
25 26
26 CSPSource(ContentSecurityPolicy*, const String& scheme, const String& host, int port, const String& path, WildcardDisposition hostWildcard, WildcardDisposit ion portWildcard); 27 CSPSource(ContentSecurityPolicy*, const String& scheme, const String& host, int port, const String& path, WildcardDisposition hostWildcard, WildcardDisposit ion portWildcard);
27 bool matches(const KURL&, ContentSecurityPolicy::RedirectStatus = ContentSec urityPolicy::DidNotRedirect) const; 28 bool matches(const KURL&, RedirectStatus = ResourceRequest::RedirectStatus:: NoRedirect) const;
foolip 2016/05/30 10:10:23 I suppose the alias in ContentSecurityPolicy.h is
Mike West 2016/05/30 14:59:31 Yeah, this was a typo; I moved the enum from outsi
28 29
29 DECLARE_TRACE(); 30 DECLARE_TRACE();
30 31
31 private: 32 private:
32 bool schemeMatches(const KURL&) const; 33 bool schemeMatches(const KURL&) const;
33 bool hostMatches(const KURL&) const; 34 bool hostMatches(const KURL&) const;
34 bool pathMatches(const KURL&) const; 35 bool pathMatches(const KURL&) const;
35 bool portMatches(const KURL&) const; 36 bool portMatches(const KURL&) const;
36 bool isSchemeOnly() const; 37 bool isSchemeOnly() const;
37 38
38 Member<ContentSecurityPolicy> m_policy; 39 Member<ContentSecurityPolicy> m_policy;
39 String m_scheme; 40 String m_scheme;
40 String m_host; 41 String m_host;
41 int m_port; 42 int m_port;
42 String m_path; 43 String m_path;
43 44
44 WildcardDisposition m_hostWildcard; 45 WildcardDisposition m_hostWildcard;
45 WildcardDisposition m_portWildcard; 46 WildcardDisposition m_portWildcard;
46 }; 47 };
47 48
48 } // namespace blink 49 } // namespace blink
49 50
50 #endif 51 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698