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

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

Issue 189373010: Get rid of WTF::SHA1. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on ToT and fixed header guard collision. Created 6 years, 8 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
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/wtf/SHA1.h » ('j') | 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 #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/PlatformExport.h" 9 #include "platform/PlatformExport.h"
9 #include "wtf/Vector.h" 10 #include "wtf/Vector.h"
10 #include "wtf/unicode/Unicode.h" 11 #include "wtf/unicode/Unicode.h"
11 12
12 namespace WebCore { 13 namespace WebCore {
13 14
14 static const size_t kMaxDigestSize = 64;
15 typedef Vector<uint8_t, kMaxDigestSize> DigestValue;
16 typedef std::pair<unsigned, DigestValue> CSPHashValue; 15 typedef std::pair<unsigned, DigestValue> CSPHashValue;
17 16
18 enum ContentSecurityPolicyHeaderType { 17 enum ContentSecurityPolicyHeaderType {
19 ContentSecurityPolicyHeaderTypeReport, 18 ContentSecurityPolicyHeaderTypeReport,
20 ContentSecurityPolicyHeaderTypeEnforce 19 ContentSecurityPolicyHeaderTypeEnforce
21 }; 20 };
22 21
23 enum ContentSecurityPolicyHeaderSource { 22 enum ContentSecurityPolicyHeaderSource {
24 ContentSecurityPolicyHeaderSourceHTTP, 23 ContentSecurityPolicyHeaderSourceHTTP,
25 ContentSecurityPolicyHeaderSourceMeta 24 ContentSecurityPolicyHeaderSourceMeta
(...skipping 18 matching lines...) Expand all
44 PLATFORM_EXPORT bool isNotColonOrSlash(UChar); 43 PLATFORM_EXPORT bool isNotColonOrSlash(UChar);
45 PLATFORM_EXPORT bool isMediaTypeCharacter(UChar); 44 PLATFORM_EXPORT bool isMediaTypeCharacter(UChar);
46 45
47 // Only checks for general Base64 encoded chars, not '=' chars since '=' is 46 // Only checks for general Base64 encoded chars, not '=' chars since '=' is
48 // positional and may only appear at the end of a Base64 encoded string. 47 // positional and may only appear at the end of a Base64 encoded string.
49 PLATFORM_EXPORT bool isBase64EncodedCharacter(UChar); 48 PLATFORM_EXPORT bool isBase64EncodedCharacter(UChar);
50 49
51 } // namespace WebCore 50 } // namespace WebCore
52 51
53 #endif 52 #endif
OLDNEW
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/wtf/SHA1.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698