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

Unified Diff: third_party/WebKit/Source/core/html/forms/FileInputType.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/FileInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/FileInputType.cpp b/third_party/WebKit/Source/core/html/forms/FileInputType.cpp
index e350501391b08f12cdd444172b2f411cbcc99923..ed6d99e50158775802bd20c3c7847f48762f6a6a 100644
--- a/third_party/WebKit/Source/core/html/forms/FileInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/FileInputType.cpp
@@ -73,9 +73,9 @@ Vector<FileChooserFileInfo> FileInputType::filesFromFormControlState(
Vector<FileChooserFileInfo> files;
for (size_t i = 0; i < state.valueSize(); i += 2) {
if (!state[i + 1].isEmpty())
- files.append(FileChooserFileInfo(state[i], state[i + 1]));
+ files.push_back(FileChooserFileInfo(state[i], state[i + 1]));
else
- files.append(FileChooserFileInfo(state[i]));
+ files.push_back(FileChooserFileInfo(state[i]));
}
return files;
}
@@ -332,7 +332,7 @@ void FileInputType::setFilesFromDirectory(const String& path) {
HTMLInputElement& input = element();
settings.allowsDirectoryUpload = true;
settings.allowsMultipleFiles = true;
- settings.selectedFiles.append(path);
+ settings.selectedFiles.push_back(path);
settings.acceptMIMETypes = input.acceptMIMETypes();
settings.acceptFileExtensions = input.acceptFileExtensions();
chromeClient->enumerateChosenDirectory(newFileChooser(settings));
@@ -351,13 +351,13 @@ void FileInputType::setFilesFromPaths(const Vector<String>& paths) {
Vector<FileChooserFileInfo> files;
for (const auto& path : paths)
- files.append(FileChooserFileInfo(path));
+ files.push_back(FileChooserFileInfo(path));
if (input.fastHasAttribute(multipleAttr)) {
filesChosen(files);
} else {
Vector<FileChooserFileInfo> firstFileOnly;
- firstFileOnly.append(files[0]);
+ firstFileOnly.push_back(files[0]);
filesChosen(firstFileOnly);
}
}

Powered by Google App Engine
This is Rietveld 408576698