Index: chrome/browser/chromeos/gdata/gdata_file_system.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc |
index 3843ec98f417e35432e02ca44597aea865c898af..0c2c6ff956bb843b563cb80eadb97ab4648cd415 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc |
@@ -1875,21 +1875,7 @@ void GDataFileSystem::OnReadDirectory(const ReadDirectoryCallback& callback, |
return; |
} |
- scoped_ptr<GDataEntryProtoVector> entries(new GDataEntryProtoVector); |
- for (GDataFileCollection::const_iterator iter = |
- directory->child_files().begin(); |
- iter != directory->child_files().end(); ++iter) { |
- GDataEntryProto proto; |
- static_cast<const GDataEntry*>(iter->second)->ToProtoFull(&proto); |
- entries->push_back(proto); |
- } |
- for (GDataDirectoryCollection::const_iterator iter = |
- directory->child_directories().begin(); |
- iter != directory->child_directories().end(); ++iter) { |
- GDataEntryProto proto; |
- static_cast<const GDataEntry*>(iter->second)->ToProtoFull(&proto); |
- entries->push_back(proto); |
- } |
+ scoped_ptr<GDataEntryProtoVector> entries(directory->ToProtoVector()); |
if (!callback.is_null()) |
callback.Run(GDATA_FILE_OK, entries.Pass()); |