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

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

Issue 1315783003: Make classes and structures in core/frame fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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/core/frame/RootFrameViewport.h ('k') | Source/core/frame/TopControls.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 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 #include "wtf/Allocator.h"
10 11
11 namespace WTF { 12 namespace WTF {
12 class String; 13 class String;
13 }; 14 };
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class Document; 18 class Document;
18 class Element; 19 class Element;
19 class KURL; 20 class KURL;
20 class Resource; 21 class Resource;
21 22
22 class CORE_EXPORT SubresourceIntegrity { 23 class CORE_EXPORT SubresourceIntegrity {
24 STATIC_ONLY(SubresourceIntegrity);
23 public: 25 public:
24 enum IntegrityParseResult { 26 enum IntegrityParseResult {
25 IntegrityParseValidResult, 27 IntegrityParseValidResult,
26 IntegrityParseNoValidResult 28 IntegrityParseNoValidResult
27 }; 29 };
28 30
29 static bool CheckSubresourceIntegrity(const Element&, const WTF::String& con tent, const KURL& resourceUrl, const Resource&); 31 static bool CheckSubresourceIntegrity(const Element&, const WTF::String& con tent, const KURL& resourceUrl, const Resource&);
30 static bool CheckSubresourceIntegrity(const String&, const WTF::String& cont ent, const KURL& resourceUrl, Document&, WTF::String&); 32 static bool CheckSubresourceIntegrity(const String&, const WTF::String& cont ent, const KURL& resourceUrl, Document&, WTF::String&);
31 33
32 private: 34 private:
(...skipping 18 matching lines...) Expand all
51 static HashAlgorithm getPrioritizedHashFunction(HashAlgorithm, HashAlgorithm ); 53 static HashAlgorithm getPrioritizedHashFunction(HashAlgorithm, HashAlgorithm );
52 static AlgorithmParseResult parseAlgorithm(const UChar*& begin, const UChar* end, HashAlgorithm&); 54 static AlgorithmParseResult parseAlgorithm(const UChar*& begin, const UChar* end, HashAlgorithm&);
53 static bool parseDigest(const UChar*& begin, const UChar* end, String& diges t); 55 static bool parseDigest(const UChar*& begin, const UChar* end, String& diges t);
54 56
55 static IntegrityParseResult parseIntegrityAttribute(const WTF::String& attri bute, WTF::Vector<IntegrityMetadata>& metadataList, Document&); 57 static IntegrityParseResult parseIntegrityAttribute(const WTF::String& attri bute, WTF::Vector<IntegrityMetadata>& metadataList, Document&);
56 }; 58 };
57 59
58 } // namespace blink 60 } // namespace blink
59 61
60 #endif 62 #endif
OLDNEW
« no previous file with comments | « Source/core/frame/RootFrameViewport.h ('k') | Source/core/frame/TopControls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698