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

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

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs Created 3 years, 10 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 d9807bd0357fbda817ecb88b70ac7d9de3b5974d..a39bd01757bc290cadd2c2d97c2aab3bd65965d3 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -574,11 +574,11 @@ void SourceListDirective::addSourceHash(
void SourceListDirective::addSourceToMap(
HeapHashMap<String, Member<CSPSource>>& hashMap,
CSPSource* source) {
- hashMap.add(source->getScheme(), source);
+ hashMap.insert(source->getScheme(), source);
if (source->getScheme() == "http")
- hashMap.add("https", source);
+ hashMap.insert("https", source);
else if (source->getScheme() == "ws")
- hashMap.add("wss", source);
+ hashMap.insert("wss", source);
}
bool SourceListDirective::hasSourceMatchInList(
@@ -755,9 +755,9 @@ SourceListDirective::getIntersectSchemesOnly(
if (schemesA.contains(sourceB->getScheme()))
addSourceToMap(intersect, sourceB);
else if (sourceB->getScheme() == "http" && schemesA.contains("https"))
- intersect.add("https", schemesA.get("https"));
+ intersect.insert("https", schemesA.get("https"));
else if (sourceB->getScheme() == "ws" && schemesA.contains("wss"))
- intersect.add("wss", schemesA.get("wss"));
+ intersect.insert("wss", schemesA.get("wss"));
}
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/HostsUsingFeatures.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698