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

Side by Side Diff: third_party/WebKit/Source/platform/network/ContentSecurityPolicyParsers.h

Issue 1420483005: CSP: Don't perform NFC normalization prior to hashing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nfc-frame
Patch Set: Rework test to ensure tests are identical when normalized Created 5 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
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 ContentSecurityPolicyParsers_h 5 #ifndef ContentSecurityPolicyParsers_h
6 #define ContentSecurityPolicyParsers_h 6 #define ContentSecurityPolicyParsers_h
7 7
8 #include "platform/Crypto.h" 8 #include "platform/Crypto.h"
9 #include "platform/PlatformExport.h" 9 #include "platform/PlatformExport.h"
10 #include "wtf/text/Unicode.h" 10 #include "wtf/text/Unicode.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 PLATFORM_EXPORT bool isHostCharacter(UChar); 45 PLATFORM_EXPORT bool isHostCharacter(UChar);
46 PLATFORM_EXPORT bool isSchemeContinuationCharacter(UChar); 46 PLATFORM_EXPORT bool isSchemeContinuationCharacter(UChar);
47 PLATFORM_EXPORT bool isNotASCIISpace(UChar); 47 PLATFORM_EXPORT bool isNotASCIISpace(UChar);
48 PLATFORM_EXPORT bool isNotColonOrSlash(UChar); 48 PLATFORM_EXPORT bool isNotColonOrSlash(UChar);
49 PLATFORM_EXPORT bool isMediaTypeCharacter(UChar); 49 PLATFORM_EXPORT bool isMediaTypeCharacter(UChar);
50 50
51 // Only checks for general Base64 encoded chars, not '=' chars since '=' is 51 // Only checks for general Base64 encoded chars, not '=' chars since '=' is
52 // positional and may only appear at the end of a Base64 encoded string. 52 // positional and may only appear at the end of a Base64 encoded string.
53 PLATFORM_EXPORT bool isBase64EncodedCharacter(UChar); 53 PLATFORM_EXPORT bool isBase64EncodedCharacter(UChar);
54 54
55 // Normalize script or style source for script hash use.
56 PLATFORM_EXPORT WTF::StringUTF8Adaptor normalizeSource(const String& source);
57
58 } // namespace blink 55 } // namespace blink
59 56
60 #endif 57 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698