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

Unified Diff: chrome/browser/dom_ui/filebrowse_ui.cc

Issue 3175023: Allow net::DirectoryLister to be used to recursively list the directory, and ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | chrome/browser/dom_ui/slideshow_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/filebrowse_ui.cc
===================================================================
--- chrome/browser/dom_ui/filebrowse_ui.cc (revision 56913)
+++ chrome/browser/dom_ui/filebrowse_ui.cc (working copy)
@@ -107,7 +107,8 @@
void Init();
// DirectoryLister::DirectoryListerDelegate methods:
- virtual void OnListFile(const file_util::FileEnumerator::FindInfo& data);
+ virtual void OnListFile(
+ const net::DirectoryLister::DirectoryListerData& data);
virtual void OnListDone(int error);
// DOMMessageHandler implementation.
@@ -766,6 +767,7 @@
}
if (currentpath_ == default_download_path) {
lister_ = new net::DirectoryLister(currentpath_,
+ false,
net::DirectoryLister::DATE,
this);
} else {
@@ -785,13 +787,13 @@
}
void FilebrowseHandler::OnListFile(
- const file_util::FileEnumerator::FindInfo& data) {
+ const net::DirectoryLister::DirectoryListerData& data) {
#if defined(OS_WIN)
- if (data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) {
+ if (data.info.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) {
return;
}
#elif defined(OS_POSIX)
- if (data.filename[0] == '.') {
+ if (data.info.filename[0] == '.') {
return;
}
#endif
@@ -799,18 +801,18 @@
DictionaryValue* file_value = new DictionaryValue();
#if defined(OS_WIN)
- int64 size = (static_cast<int64>(data.nFileSizeHigh) << 32) |
- data.nFileSizeLow;
- file_value->SetString(kPropertyTitle, data.cFileName);
+ int64 size = (static_cast<int64>(data.info.nFileSizeHigh) << 32) |
+ data.info.nFileSizeLow;
+ file_value->SetString(kPropertyTitle, data.info.cFileName);
file_value->SetString(kPropertyPath,
- currentpath_.Append(data.cFileName).value());
+ currentpath_.Append(data.info.cFileName).value());
file_value->SetBoolean(kPropertyDirectory,
- (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? true : false);
+ (data.info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? true : false);
#elif defined(OS_POSIX)
- file_value->SetString(kPropertyTitle, data.filename);
+ file_value->SetString(kPropertyTitle, data.info.filename);
file_value->SetString(kPropertyPath,
- currentpath_.Append(data.filename).value());
- file_value->SetBoolean(kPropertyDirectory, S_ISDIR(data.stat.st_mode));
+ currentpath_.Append(data.info.filename).value());
+ file_value->SetBoolean(kPropertyDirectory, S_ISDIR(data.info.stat.st_mode));
#endif
filelist_value_->Append(file_value);
}
« no previous file with comments | « no previous file | chrome/browser/dom_ui/slideshow_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698