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

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

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
« no previous file with comments | « third_party/WebKit/Source/platform/network/ContentSecurityPolicyParsers.h ('k') | no next file » | 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 "platform/network/ContentSecurityPolicyParsers.h" 6 #include "platform/network/ContentSecurityPolicyParsers.h"
7 7
8 #include "wtf/ASCIICType.h" 8 #include "wtf/ASCIICType.h"
9 #include "wtf/text/StringUTF8Adaptor.h" 9 #include "wtf/text/StringUTF8Adaptor.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool isNotColonOrSlash(UChar c) 60 bool isNotColonOrSlash(UChar c)
61 { 61 {
62 return c != ':' && c != '/'; 62 return c != ':' && c != '/';
63 } 63 }
64 64
65 bool isMediaTypeCharacter(UChar c) 65 bool isMediaTypeCharacter(UChar c)
66 { 66 {
67 return !isASCIISpace(c) && c != '/'; 67 return !isASCIISpace(c) && c != '/';
68 } 68 }
69 69
70 WTF::StringUTF8Adaptor normalizeSource(const String& source)
71 {
72 return WTF::StringUTF8Adaptor(source, WTF::StringUTF8Adaptor::Normalize, WTF ::EntitiesForUnencodables);
73 }
74
75 } // namespace 70 } // namespace
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/network/ContentSecurityPolicyParsers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698