| 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 #ifndef SubresourceIntegrity_h | 5 #ifndef SubresourceIntegrity_h |
| 6 #define SubresourceIntegrity_h | 6 #define SubresourceIntegrity_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/Crypto.h" | 9 #include "platform/Crypto.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 struct IntegrityMetadata { | 44 struct IntegrityMetadata { |
| 45 WTF::String digest; | 45 WTF::String digest; |
| 46 HashAlgorithm algorithm; | 46 HashAlgorithm algorithm; |
| 47 WTF::String type; | 47 WTF::String type; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 static AlgorithmParseResult parseAlgorithm(const UChar*& begin, const UChar*
end, HashAlgorithm&); | 50 static AlgorithmParseResult parseAlgorithm(const UChar*& begin, const UChar*
end, HashAlgorithm&); |
| 51 static bool parseDigest(const UChar*& begin, const UChar* end, String& diges
t); | 51 static bool parseDigest(const UChar*& begin, const UChar* end, String& diges
t); |
| 52 static bool parseMimeType(const UChar*& begin, const UChar* end, String& typ
e); | 52 static bool parseOption(const UChar*& begin, const UChar* end, String& name,
String& value); |
| 53 static bool isValidMimeTypeValue(const String& value); |
| 53 | 54 |
| 54 static IntegrityParseResult parseIntegrityAttribute(const WTF::String& attri
bute, WTF::Vector<IntegrityMetadata>& metadataList, Document&); | 55 static IntegrityParseResult parseIntegrityAttribute(const WTF::String& attri
bute, WTF::Vector<IntegrityMetadata>& metadataList, Document&); |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace blink | 58 } // namespace blink |
| 58 | 59 |
| 59 #endif | 60 #endif |
| OLD | NEW |