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

Unified Diff: third_party/WebKit/Source/core/frame/HostsUsingFeatures.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/HostsUsingFeatures.cpp
diff --git a/third_party/WebKit/Source/core/frame/HostsUsingFeatures.cpp b/third_party/WebKit/Source/core/frame/HostsUsingFeatures.cpp
index 860fc1e47eb11ccfe62d2ffd3fc72392b666f731..f84ea4a23e8379225076c5bd99f6784a80efcbf1 100644
--- a/third_party/WebKit/Source/core/frame/HostsUsingFeatures.cpp
+++ b/third_party/WebKit/Source/core/frame/HostsUsingFeatures.cpp
@@ -65,7 +65,7 @@ void HostsUsingFeatures::Value::count(Feature feature) {
}
void HostsUsingFeatures::countName(Feature feature, const String& name) {
- auto result = m_valueByName.add(name, Value());
+ auto result = m_valueByName.insert(name, Value());
result.storedValue->value.count(feature);
}
@@ -106,7 +106,7 @@ void HostsUsingFeatures::recordHostToRappor() {
for (const auto& urlAndValue : m_urlAndValues) {
DCHECK(!urlAndValue.first.isEmpty());
auto result =
- aggregatedByHost.add(urlAndValue.first.host(), urlAndValue.second);
+ aggregatedByHost.insert(urlAndValue.first.host(), urlAndValue.second);
if (!result.isNewEntry)
result.storedValue->value.aggregate(urlAndValue.second);
}
@@ -123,7 +123,7 @@ void HostsUsingFeatures::recordETLDPlus1ToRappor() {
HashMap<String, HostsUsingFeatures::Value> aggregatedByURL;
for (const auto& urlAndValue : m_urlAndValues) {
DCHECK(!urlAndValue.first.isEmpty());
- auto result = aggregatedByURL.add(urlAndValue.first, urlAndValue.second);
+ auto result = aggregatedByURL.insert(urlAndValue.first, urlAndValue.second);
if (!result.isNewEntry)
result.storedValue->value.aggregate(urlAndValue.second);
}

Powered by Google App Engine
This is Rietveld 408576698