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

Side by Side Diff: third_party/WebKit/Source/core/fetch/IntegrityMetadata.h

Issue 2584423002: Loading: move core/fetch to platform/loader/fetch (Closed)
Patch Set: rebase Created 3 years, 11 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IntegrityMetadata_h
6 #define IntegrityMetadata_h
7
8 #include "core/CoreExport.h"
9 #include "platform/Crypto.h"
10 #include "wtf/HashSet.h"
11 #include "wtf/StringHasher.h"
12 #include "wtf/text/StringHash.h"
13 #include "wtf/text/WTFString.h"
14
15 namespace blink {
16
17 class IntegrityMetadata;
18
19 using IntegrityMetadataPair = std::pair<WTF::String, HashAlgorithm>;
20 using IntegrityMetadataSet = WTF::HashSet<IntegrityMetadataPair>;
21
22 class CORE_EXPORT IntegrityMetadata {
23 public:
24 IntegrityMetadata() {}
25 IntegrityMetadata(WTF::String digest, HashAlgorithm);
26 IntegrityMetadata(std::pair<WTF::String, HashAlgorithm>);
27
28 WTF::String digest() const { return m_digest; }
29 void setDigest(const WTF::String& digest) { m_digest = digest; }
30 HashAlgorithm algorithm() const { return m_algorithm; }
31 void setAlgorithm(HashAlgorithm algorithm) { m_algorithm = algorithm; }
32
33 IntegrityMetadataPair toPair() const;
34
35 static bool setsEqual(const IntegrityMetadataSet& set1,
36 const IntegrityMetadataSet& set2);
37
38 private:
39 WTF::String m_digest;
40 HashAlgorithm m_algorithm;
41 };
42
43 enum class ResourceIntegrityDisposition { NotChecked = 0, Failed, Passed };
44
45 } // namespace blink
46
47 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698