Index: Source/core/frame/SubresourceIntegrity.h |
diff --git a/Source/core/frame/SubresourceIntegrity.h b/Source/core/frame/SubresourceIntegrity.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f17cf51ad000dd604dd4b4e6965fff115c262ff0 |
--- /dev/null |
+++ b/Source/core/frame/SubresourceIntegrity.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SubresourceIntegrity_h |
+#define SubresourceIntegrity_h |
+ |
+#include "platform/Crypto.h" |
+ |
+namespace WTF { |
+class String; |
+}; |
+ |
+namespace blink { |
+ |
+class Element; |
+class KURL; |
+ |
+class SubresourceIntegrity { |
+public: |
+ static bool CheckSubresourceIntegrity(const Element&, const WTF::String&, const KURL& resourceUrl); |
+ |
+private: |
+ static bool parseIntegrityAttribute(const WTF::String& attribute, WTF::String& integrity, HashAlgorithm&); |
Mike West
2014/09/16 06:45:04
These are both very unit-testable methods. I'd sug
jww
2014/09/16 22:34:49
Done.
|
+}; |
+ |
+} // namespace blink |
+ |
+#endif |