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

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

Issue 656063002: Subresource Integrity: Improve parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
Index: Source/core/frame/SubresourceIntegrity.h
diff --git a/Source/core/frame/SubresourceIntegrity.h b/Source/core/frame/SubresourceIntegrity.h
index 19ded509a7a7b62abb467d6b9a73cb6cc3d6898b..38011aaee1446491f8d7cdf86792c4c2982a7e57 100644
--- a/Source/core/frame/SubresourceIntegrity.h
+++ b/Source/core/frame/SubresourceIntegrity.h
@@ -13,6 +13,7 @@ class String;
namespace blink {
+class Document;
class Element;
class KURL;
@@ -21,11 +22,12 @@ 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;
+ friend class SubresourceIntegrityTest;
jww 2014/10/15 23:26:04 I still think it would be better to use the gtest_
Mike West 2014/10/16 06:17:21 Done.
- static bool parseIntegrityAttribute(const WTF::String& attribute, WTF::String& integrity, HashAlgorithm&);
+ static bool parseAlgorithm(const UChar*& begin, const UChar* end, HashAlgorithm&);
+ static bool parseDigest(const UChar*& begin, const UChar* end, String& digest);
+
+ static bool parseIntegrityAttribute(const WTF::String& attribute, WTF::String& integrity, HashAlgorithm&, Document&);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698