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

Unified Diff: third_party/WebKit/Source/core/html/forms/FormController.cpp

Issue 2583233002: Migrate WTF::Vector::append() to ::push_back() [part 7 of N] (Closed)
Patch Set: Created 4 years 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 42eaad3a58685b0891a723c3fbc450326617a01e..975daedb27b8d1f76f7105630fdeccbbd9d08996 100644
--- a/third_party/WebKit/Source/core/html/forms/FormController.cpp
+++ b/third_party/WebKit/Source/core/html/forms/FormController.cpp
@@ -59,9 +59,9 @@ static inline HTMLFormElement* ownerFormForState(
void FormControlState::serializeTo(Vector<String>& stateVector) const {
DCHECK(!isFailure());
- stateVector.append(String::number(m_values.size()));
+ stateVector.push_back(String::number(m_values.size()));
for (const auto& value : m_values)
- stateVector.append(value.isNull() ? emptyString() : value);
+ stateVector.push_back(value.isNull() ? emptyString() : value);
}
FormControlState FormControlState::deserialize(
@@ -241,13 +241,13 @@ std::unique_ptr<SavedFormState> SavedFormState::deserialize(
}
void SavedFormState::serializeTo(Vector<String>& stateVector) const {
- stateVector.append(String::number(m_controlStateCount));
+ stateVector.push_back(String::number(m_controlStateCount));
for (const auto& formControl : m_stateForNewFormElements) {
const FormElementKey& key = formControl.key;
const Deque<FormControlState>& queue = formControl.value;
for (const FormControlState& formControlState : queue) {
- stateVector.append(key.name());
- stateVector.append(key.type());
+ stateVector.push_back(key.name());
+ stateVector.push_back(key.type());
formControlState.serializeTo(stateVector);
}
}
@@ -296,7 +296,7 @@ Vector<String> SavedFormState::getReferencedFilePaths() const {
HTMLInputElement::filesFromFileInputFormControlState(
formControlState);
for (const auto& file : selectedFiles)
- toReturn.append(file.path);
+ toReturn.push_back(file.path);
}
}
return toReturn;
@@ -441,9 +441,9 @@ Vector<String> DocumentState::toStateVector() {
Vector<String> stateVector;
stateVector.reserveInitialCapacity(m_formControls.size() * 4);
- stateVector.append(formStateSignature());
+ stateVector.push_back(formStateSignature());
for (const auto& savedFormState : *stateMap) {
- stateVector.append(savedFormState.key);
+ stateVector.push_back(savedFormState.key);
savedFormState.value->serializeTo(stateVector);
}
bool hasOnlySignature = stateVector.size() == 1;

Powered by Google App Engine
This is Rietveld 408576698