| 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 "platform/network/ContentSecurityPolicyParsers.h" | 5 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 6 | 6 |
| 7 #include "wtf/ASCIICType.h" | 7 #include "platform/wtf/ASCIICType.h" |
| 8 #include "wtf/text/StringUTF8Adaptor.h" | 8 #include "platform/wtf/text/StringUTF8Adaptor.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 bool isCSPDirectiveNameCharacter(UChar c) { | 12 bool isCSPDirectiveNameCharacter(UChar c) { |
| 13 return isASCIIAlphanumeric(c) || c == '-'; | 13 return isASCIIAlphanumeric(c) || c == '-'; |
| 14 } | 14 } |
| 15 | 15 |
| 16 bool isCSPDirectiveValueCharacter(UChar c) { | 16 bool isCSPDirectiveValueCharacter(UChar c) { |
| 17 return isASCIISpace(c) || (c >= 0x21 && c <= 0x7e); // Whitespace + VCHAR | 17 return isASCIISpace(c) || (c >= 0x21 && c <= 0x7e); // Whitespace + VCHAR |
| 18 } | 18 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 49 | 49 |
| 50 bool isNotColonOrSlash(UChar c) { | 50 bool isNotColonOrSlash(UChar c) { |
| 51 return c != ':' && c != '/'; | 51 return c != ':' && c != '/'; |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool isMediaTypeCharacter(UChar c) { | 54 bool isMediaTypeCharacter(UChar c) { |
| 55 return !isASCIISpace(c) && c != '/'; | 55 return !isASCIISpace(c) && c != '/'; |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace blink | 58 } // namespace blink |
| OLD | NEW |