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

Side by Side Diff: Source/core/frame/SubresourceIntegrity.h

Issue 1126343003: Ignore unknown options to subresource integrity (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698