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

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

Issue 10815008: gdata: Make GDataFileSystem::ReadDirectoryByPath() much more efficient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove a blank line Created 8 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
Index: chrome/browser/chromeos/gdata/gdata_download_observer.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.cc b/chrome/browser/chromeos/gdata/gdata_download_observer.cc
index 1d9d0585911b59a14edb342f5d5c2bbe07090e41..c6299d07349e4096619fb44ecbaf8a7108beb8e9 100644
--- a/chrome/browser/chromeos/gdata/gdata_download_observer.cc
+++ b/chrome/browser/chromeos/gdata/gdata_download_observer.cc
@@ -473,27 +473,26 @@ void GDataDownloadObserver::CreateUploadFileInfo(DownloadItem* download) {
// Get the GDataDirectory proto for the upload directory, then extract the
// initial upload URL in OnReadDirectoryByPath().
const FilePath upload_dir = upload_file_info->gdata_path.DirName();
- file_system_->ReadDirectoryByPath(
+ file_system_->GetEntryInfoByPath(
upload_dir,
- base::Bind(&GDataDownloadObserver::OnReadDirectoryByPath,
+ base::Bind(&GDataDownloadObserver::OnGetEntryInfoByPath,
weak_ptr_factory_.GetWeakPtr(),
download->GetId(),
base::Passed(&upload_file_info)));
}
-void GDataDownloadObserver::OnReadDirectoryByPath(
+void GDataDownloadObserver::OnGetEntryInfoByPath(
int32 download_id,
scoped_ptr<UploadFileInfo> upload_file_info,
GDataFileError error,
- bool /* hide_hosted_documents */,
- scoped_ptr<GDataDirectoryProto> dir_proto) {
+ scoped_ptr<GDataEntryProto> entry_proto) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(upload_file_info.get());
// TODO(hshi): if the upload directory is no longer valid, use the root
// directory instead.
upload_file_info->initial_upload_location =
- dir_proto.get() ? GURL(dir_proto->gdata_entry().upload_url()) : GURL();
+ entry_proto.get() ? GURL(entry_proto->upload_url()) : GURL();
StartUpload(download_id, upload_file_info.Pass());
}

Powered by Google App Engine
This is Rietveld 408576698