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

Unified Diff: third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
index 578582d2f2c8dc51e47ac5b7bc90bed7cb29a22b..d9807bd0357fbda817ecb88b70ac7d9de3b5974d 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -561,13 +561,13 @@ void SourceListDirective::addSourceUnsafeHashedAttributes() {
}
void SourceListDirective::addSourceNonce(const String& nonce) {
- m_nonces.add(nonce);
+ m_nonces.insert(nonce);
}
void SourceListDirective::addSourceHash(
const ContentSecurityPolicyHashAlgorithm& algorithm,
const DigestValue& hash) {
- m_hashes.add(CSPHashValue(algorithm, hash));
+ m_hashes.insert(CSPHashValue(algorithm, hash));
m_hashAlgorithmsUsed |= algorithm;
}
@@ -719,7 +719,7 @@ HashSet<String> SourceListDirective::getIntersectNonces(
HashSet<String> normalized;
for (const auto& nonce : m_nonces) {
if (other.contains(nonce))
- normalized.add(nonce);
+ normalized.insert(nonce);
}
return normalized;
@@ -733,7 +733,7 @@ HashSet<CSPHashValue> SourceListDirective::getIntersectHashes(
HashSet<CSPHashValue> normalized;
for (const auto& hash : m_hashes) {
if (other.contains(hash))
- normalized.add(hash);
+ normalized.insert(hash);
}
return normalized;

Powered by Google App Engine
This is Rietveld 408576698