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

Unified Diff: Source/core/frame/SubresourceIntegrity.h

Issue 566083003: Implementation of subresource integrity attribute for secure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed broken build Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ScriptLoader.cpp ('k') | Source/core/frame/SubresourceIntegrity.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..19ded509a7a7b62abb467d6b9a73cb6cc3d6898b
--- /dev/null
+++ b/Source/core/frame/SubresourceIntegrity.h
@@ -0,0 +1,33 @@
+// 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:
+ // FIXME: After the merge with the Chromium repo, this should be refactored
+ // to use FRIEND_TEST in base/gtest_prod_util.h.
+ friend class SubresourceIntegrityTest_Parsing_Test;
+
+ static bool parseIntegrityAttribute(const WTF::String& attribute, WTF::String& integrity, HashAlgorithm&);
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/core/dom/ScriptLoader.cpp ('k') | Source/core/frame/SubresourceIntegrity.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698