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

Unified Diff: webkit/fileapi/file_system_dir_url_request_job.cc

Issue 7353012: Fill size and modified time entry on FileSystem API directory view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « no previous file | webkit/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_dir_url_request_job.cc
diff --git a/webkit/fileapi/file_system_dir_url_request_job.cc b/webkit/fileapi/file_system_dir_url_request_job.cc
index 05c21beb12276d13d1c280a851140f341f1ff276..aefbccc35fa8546a9df01ecb7c51db8452091bb7 100644
--- a/webkit/fileapi/file_system_dir_url_request_job.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job.cc
@@ -148,10 +148,10 @@ void FileSystemDirURLRequestJob::DidReadDirectory(
#if defined(OS_WIN)
const string16& title = relative_path.value();
#elif defined(OS_POSIX)
- const string16& title = WideToUTF16(
- base::SysNativeMBToWide(relative_path.value()));
+ const string16& title = ASCIIToUTF16("/") +
+ WideToUTF16(base::SysNativeMBToWide(relative_path.value()));
#endif
- data_.append(net::GetDirectoryListingHeader(ASCIIToUTF16("/") + title));
+ data_.append(net::GetDirectoryListingHeader(title));
}
typedef std::vector<base::FileUtilProxy::Entry>::const_iterator EntryIterator;
@@ -162,14 +162,14 @@ void FileSystemDirURLRequestJob::DidReadDirectory(
const string16& name =
WideToUTF16(base::SysNativeMBToWide(it->name));
#endif
- // TODO(adamk): Add file size?
data_.append(net::GetDirectoryListingEntry(
- name, std::string(), it->is_directory, 0, base::Time()));
+ name, std::string(), it->is_directory, it->size,
+ it->last_modified_time));
}
- if (has_more)
+ if (has_more) {
GetNewOperation()->ReadDirectory(request_->url());
- else {
+ } else {
set_expected_content_size(data_.size());
NotifyHeadersComplete();
}
« no previous file with comments | « no previous file | webkit/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698