summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webdropdata.cc
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-11-01 12:19:54 +0000
committerIain Merrick <husky@google.com>2010-11-03 10:21:10 +0000
commit731df977c0511bca2206b5f333555b1205ff1f43 (patch)
tree0e750b949b3f00a1ac11fda25d3c2de512f2b465 /webkit/glue/webdropdata.cc
parent5add15e10e7bb80512f2c597ca57221314abe577 (diff)
downloadexternal_chromium-731df977c0511bca2206b5f333555b1205ff1f43.zip
external_chromium-731df977c0511bca2206b5f333555b1205ff1f43.tar.gz
external_chromium-731df977c0511bca2206b5f333555b1205ff1f43.tar.bz2
Merge Chromium at r63472 : Initial merge by git.
Change-Id: Ifb9ee821af006a5f2211e81471be93ae440a1f5a
Diffstat (limited to 'webkit/glue/webdropdata.cc')
-rw-r--r--webkit/glue/webdropdata.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/webkit/glue/webdropdata.cc b/webkit/glue/webdropdata.cc
index ea9e6c6..cda887d 100644
--- a/webkit/glue/webdropdata.cc
+++ b/webkit/glue/webdropdata.cc
@@ -28,12 +28,12 @@ WebDropData::WebDropData(const WebDragData& drag_data)
plain_text(drag_data.plainText()),
text_html(drag_data.htmlText()),
html_base_url(drag_data.htmlBaseURL()),
- file_description_filename(drag_data.fileContentFileName()) {
- if (drag_data.hasFileNames()) {
- WebVector<WebString> fileNames;
- drag_data.fileNames(fileNames);
- for (size_t i = 0; i < fileNames.size(); ++i)
- filenames.push_back(fileNames[i]);
+ file_description_filename(drag_data.fileContentFilename()) {
+ if (drag_data.containsFilenames()) {
+ WebVector<WebString> filenames_copy;
+ drag_data.filenames(filenames_copy);
+ for (size_t i = 0; i < filenames_copy.size(); ++i)
+ filenames.push_back(filenames_copy[i]);
}
WebData contents = drag_data.fileContent();
if (!contents.isEmpty())
@@ -53,11 +53,11 @@ WebDragData WebDropData::ToDragData() const {
result.setURL(url);
result.setURLTitle(url_title);
result.setFileExtension(file_extension);
- result.setFileNames(filenames);
+ result.setFilenames(filenames);
result.setPlainText(plain_text);
result.setHTMLText(text_html);
result.setHTMLBaseURL(html_base_url);
- result.setFileContentFileName(file_description_filename);
+ result.setFileContentFilename(file_description_filename);
result.setFileContent(WebData(file_contents.data(), file_contents.size()));
return result;
}