Chromium Code Reviews| Index: chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc |
| diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc |
| index 6f4c18623196c6bf0d90366f5d790e77da9bef6b..3ab8e60d90acff0dc4251addf8bc8ea6b19ad69e 100644 |
| --- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc |
| +++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc |
| @@ -677,7 +677,7 @@ void GDataFileSystemProxy::OnReadDirectory( |
| callback, |
| GDataFileError error, |
| bool hide_hosted_documents, |
| - scoped_ptr<gdata::GDataDirectoryProto> directory_proto) { |
| + scoped_ptr<gdata::GDataEntryProtoVector> proto_entries) { |
|
achuithb
2012/07/21 22:34:19
same
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| if (error != GDATA_FILE_OK) { |
| @@ -686,18 +686,17 @@ void GDataFileSystemProxy::OnReadDirectory( |
| false); |
| return; |
| } |
| + DCHECK(proto_entries.get()); |
| + |
| std::vector<base::FileUtilProxy::Entry> entries; |
| // Convert gdata files to something File API stack can understand. |
| - for (int i = 0; i < directory_proto->child_directories_size(); ++i) { |
| - const GDataDirectoryProto& proto = directory_proto->child_directories(i); |
| - entries.push_back( |
| - GDataEntryProtoToFileUtilProxyEntry(proto.gdata_entry())); |
| - } |
| - for (int i = 0; i < directory_proto->child_files_size(); ++i) { |
| - const GDataEntryProto& proto = directory_proto->child_files(i); |
| - if (hide_hosted_documents && |
| - proto.file_specific_info().is_hosted_document()) |
| - continue; |
| + for (size_t i = 0; i < proto_entries->size(); ++i) { |
| + const GDataEntryProto& proto = (*proto_entries)[i]; |
| + if (proto.has_file_specific_info() && |
| + proto.file_specific_info().is_hosted_document() && |
| + hide_hosted_documents) { |
| + continue; |
| + } |
| entries.push_back(GDataEntryProtoToFileUtilProxyEntry(proto)); |
| } |