Index: chrome/browser/chromeos/gdata/gdata_directory_service.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_directory_service.cc b/chrome/browser/chromeos/gdata/gdata_directory_service.cc |
index 54fcfecd49fe2bba50adb4a54466d68cf2dc7aa7..df0192249c344edec92e59b8fe7f9e9e6b4b4c1b 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_directory_service.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_directory_service.cc |
@@ -326,6 +326,29 @@ void GDataDirectoryService::GetEntryByResourceIdAsync( |
callback.Run(entry); |
} |
+void GDataDirectoryService::GetEntryInfoByResourceId( |
+ const std::string& resource_id, |
+ const GetEntryInfoCallback& callback) { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(!callback.is_null()); |
+ |
+ scoped_ptr<GDataEntryProto> entry_proto; |
+ GDataFileError error = GDATA_FILE_ERROR_FAILED; |
+ |
+ GDataEntry* entry = GetEntryByResourceId(resource_id); |
+ if (entry) { |
+ entry_proto.reset(new GDataEntryProto); |
+ entry->ToProtoFull(entry_proto.get()); |
+ error = GDATA_FILE_OK; |
+ } else { |
+ error = GDATA_FILE_ERROR_NOT_FOUND; |
+ } |
+ |
+ base::MessageLoopProxy::current()->PostTask( |
+ FROM_HERE, |
+ base::Bind(callback, error, base::Passed(&entry_proto))); |
+} |
+ |
void GDataDirectoryService::GetEntryInfoByPath( |
const FilePath& path, |
const GetEntryInfoCallback& callback) { |