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

Unified Diff: Source/core/frame/csp/CSPSourceList.cpp

Issue 189373010: Get rid of WTF::SHA1. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use new digest-by-chunk API and many other fixes Created 6 years, 9 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/csp/CSPSourceList.cpp
diff --git a/Source/core/frame/csp/CSPSourceList.cpp b/Source/core/frame/csp/CSPSourceList.cpp
index a17c5bb73cf9fdd8855017d62f68db8d6b09fdd0..ebe144a8e3fec0fe64302c50995011eed7111fb6 100644
--- a/Source/core/frame/csp/CSPSourceList.cpp
+++ b/Source/core/frame/csp/CSPSourceList.cpp
@@ -7,42 +7,14 @@
#include "core/frame/csp/CSPSource.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
+#include "platform/Crypto.h"
abarth-chromium 2014/04/01 23:46:48 You already addes this to CSPSourceList.h. No nee
jww 2014/04/02 01:11:50 Done.
#include "platform/ParsingUtilities.h"
#include "platform/weborigin/KURL.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/HashSet.h"
-#include "wtf/StringHasher.h"
#include "wtf/text/Base64.h"
#include "wtf/text/WTFString.h"
-namespace WTF {
-
-struct DigestValueHash {
- static unsigned hash(const WebCore::DigestValue& v)
- {
- return StringHasher::computeHash(v.data(), v.size());
- }
- static bool equal(const WebCore::DigestValue& a, const WebCore::DigestValue& b)
- {
- return a == b;
- };
- static const bool safeToCompareToEmptyOrDeleted = true;
-};
-template <>
-struct DefaultHash<WebCore::DigestValue> {
- typedef DigestValueHash Hash;
-};
-
-template <>
-struct DefaultHash<WebCore::ContentSecurityPolicyHashAlgorithm> {
- typedef IntHash<WebCore::ContentSecurityPolicyHashAlgorithm> Hash;
-};
-template <>
-struct HashTraits<WebCore::ContentSecurityPolicyHashAlgorithm> : UnsignedWithZeroKeyHashTraits<WebCore::ContentSecurityPolicyHashAlgorithm> {
-};
-
-} // namespace WTF
-
namespace WebCore {
static bool isSourceListNone(const UChar* begin, const UChar* end)

Powered by Google App Engine
This is Rietveld 408576698