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

Unified Diff: third_party/WebKit/Source/core/html/forms/FormController.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/html/forms/FormController.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/FormController.cpp b/third_party/WebKit/Source/core/html/forms/FormController.cpp
index 7d96f148ebd616dc63cbccc7ebbda11e030f9198..2d7c78c0737a3c38665e28b861b0fecd7f8ba576 100644
--- a/third_party/WebKit/Source/core/html/forms/FormController.cpp
+++ b/third_party/WebKit/Source/core/html/forms/FormController.cpp
@@ -376,7 +376,7 @@ const AtomicString& FormKeyGenerator::formKey(
String signature = formSignature(*form);
DCHECK(!signature.isNull());
FormSignatureToNextIndexMap::AddResult result =
- m_formSignatureToNextIndexMap.add(signature, 0);
+ m_formSignatureToNextIndexMap.insert(signature, 0);
unsigned nextIndex = result.storedValue->value++;
StringBuilder formKeyBuilder;
@@ -384,7 +384,7 @@ const AtomicString& FormKeyGenerator::formKey(
formKeyBuilder.append(" #");
formKeyBuilder.appendNumber(nextIndex);
FormToKeyMap::AddResult addFormKeyresult =
- m_formToKeyMap.add(form, formKeyBuilder.toAtomicString());
+ m_formToKeyMap.insert(form, formKeyBuilder.toAtomicString());
return addFormKeyresult.storedValue->value;
}
@@ -432,7 +432,7 @@ Vector<String> DocumentState::toStateVector() {
if (!control->shouldSaveAndRestoreFormControlState())
continue;
SavedFormStateMap::AddResult result =
- stateMap->add(keyGenerator->formKey(*control), nullptr);
+ stateMap->insert(keyGenerator->formKey(*control), nullptr);
if (result.isNewEntry)
result.storedValue->value = SavedFormState::create();
result.storedValue->value->appendControlState(
@@ -510,7 +510,7 @@ void FormController::formStatesFromStateVector(
i = 0;
break;
}
- map.add(formKey, std::move(state));
+ map.insert(formKey, std::move(state));
}
if (i != stateVector.size())
map.clear();

Powered by Google App Engine
This is Rietveld 408576698