summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/chrome_client_impl.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index 4b6ab72..160833e 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -60,12 +60,11 @@ class WebFileChooserCallbackImpl : public WebFileChooserCallback {
}
virtual void OnFileChoose(const std::vector<FilePath>& file_names) {
- if (file_names.empty()) {
- file_chooser_->chooseFile(WebCore::String(""));
- } else if (file_names.size() == 1) {
+ if (file_names.size() == 1) {
file_chooser_->chooseFile(
webkit_glue::FilePathStringToString(file_names.front().value()));
} else {
+ // This clause handles a case of file_names.size()==0 too.
Vector<WebCore::String> paths;
for (std::vector<FilePath>::const_iterator filename =
file_names.begin(); filename != file_names.end(); ++filename) {