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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 10837148: gdata: Add GetEntryInfoByPath() and ReadDirectoryByPath() to GDataDirectoryService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 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
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());

Powered by Google App Engine
This is Rietveld 408576698