| 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 071ef813adf552db50c5b036ec4131e8b72b6544..3948d07054e9f9afdfe56b94c92231a613fd1fe8 100644
|
| --- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
|
| +++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
|
| @@ -453,7 +453,7 @@ struct GDataFileSystem::GetFileFromCacheParams {
|
| const std::string& md5,
|
| const std::string& mime_type,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback);
|
| + const GetContentCallback& get_content_callback);
|
| ~GetFileFromCacheParams();
|
|
|
| FilePath virtual_file_path;
|
| @@ -463,7 +463,7 @@ struct GDataFileSystem::GetFileFromCacheParams {
|
| std::string md5;
|
| std::string mime_type;
|
| const GetFileCallback get_file_callback;
|
| - const GetDownloadDataCallback get_download_data_callback;
|
| + const GetContentCallback get_content_callback;
|
| };
|
|
|
| GDataFileSystem::GetFileFromCacheParams::GetFileFromCacheParams(
|
| @@ -474,7 +474,7 @@ GDataFileSystem::GetFileFromCacheParams::GetFileFromCacheParams(
|
| const std::string& md5,
|
| const std::string& mime_type,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback)
|
| + const GetContentCallback& get_content_callback)
|
| : virtual_file_path(virtual_file_path),
|
| local_tmp_path(local_tmp_path),
|
| content_url(content_url),
|
| @@ -482,7 +482,7 @@ GDataFileSystem::GetFileFromCacheParams::GetFileFromCacheParams(
|
| md5(md5),
|
| mime_type(mime_type),
|
| get_file_callback(get_file_callback),
|
| - get_download_data_callback(get_download_data_callback) {
|
| + get_content_callback(get_content_callback) {
|
| }
|
|
|
| GDataFileSystem::GetFileFromCacheParams::~GetFileFromCacheParams() {
|
| @@ -716,7 +716,7 @@ void GDataFileSystem::TransferFileFromRemoteToLocal(
|
| ui_weak_ptr_,
|
| local_dest_file_path,
|
| callback),
|
| - GetDownloadDataCallback());
|
| + GetContentCallback());
|
| }
|
|
|
| void GDataFileSystem::TransferFileFromLocalToRemote(
|
| @@ -982,7 +982,7 @@ void GDataFileSystem::CopyOnUIThread(const FilePath& src_file_path,
|
| ui_weak_ptr_,
|
| dest_file_path,
|
| callback),
|
| - GetDownloadDataCallback());
|
| + GetContentCallback());
|
| }
|
|
|
| void GDataFileSystem::OnGetFileCompleteForCopy(
|
| @@ -1487,7 +1487,7 @@ void GDataFileSystem::OnGetEntryInfoForCreateFile(
|
| void GDataFileSystem::GetFileByPath(
|
| const FilePath& file_path,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback) {
|
| + const GetContentCallback& get_content_callback) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
|
| BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| RunTaskOnUIThread(
|
| @@ -1495,13 +1495,13 @@ void GDataFileSystem::GetFileByPath(
|
| ui_weak_ptr_,
|
| file_path,
|
| CreateRelayCallback(get_file_callback),
|
| - CreateRelayCallback(get_download_data_callback)));
|
| + CreateRelayCallback(get_content_callback)));
|
| }
|
|
|
| void GDataFileSystem::GetFileByPathOnUIThread(
|
| const FilePath& file_path,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback) {
|
| + const GetContentCallback& get_content_callback) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| directory_service_->GetEntryInfoByPath(
|
| @@ -1510,13 +1510,13 @@ void GDataFileSystem::GetFileByPathOnUIThread(
|
| ui_weak_ptr_,
|
| file_path,
|
| CreateRelayCallback(get_file_callback),
|
| - CreateRelayCallback(get_download_data_callback)));
|
| + CreateRelayCallback(get_content_callback)));
|
| }
|
|
|
| void GDataFileSystem::OnGetEntryInfoCompleteForGetFileByPath(
|
| const FilePath& file_path,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback,
|
| + const GetContentCallback& get_content_callback,
|
| GDataFileError error,
|
| scoped_ptr<GDataEntryProto> entry_proto) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| @@ -1526,7 +1526,7 @@ void GDataFileSystem::OnGetEntryInfoCompleteForGetFileByPath(
|
| (entry_proto.get() && !entry_proto->resource_id().empty()));
|
| GetResolvedFileByPath(file_path,
|
| get_file_callback,
|
| - get_download_data_callback,
|
| + get_content_callback,
|
| error,
|
| entry_proto.get());
|
| }
|
| @@ -1534,7 +1534,7 @@ void GDataFileSystem::OnGetEntryInfoCompleteForGetFileByPath(
|
| void GDataFileSystem::GetResolvedFileByPath(
|
| const FilePath& file_path,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback,
|
| + const GetContentCallback& get_content_callback,
|
| GDataFileError error,
|
| const GDataEntryProto* entry_proto) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| @@ -1606,13 +1606,13 @@ void GDataFileSystem::GetResolvedFileByPath(
|
| entry_proto->file_specific_info().file_md5(),
|
| entry_proto->file_specific_info().content_mime_type(),
|
| get_file_callback,
|
| - get_download_data_callback)));
|
| + get_content_callback)));
|
| }
|
|
|
| void GDataFileSystem::GetFileByResourceId(
|
| const std::string& resource_id,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback) {
|
| + const GetContentCallback& get_content_callback) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
|
| BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| RunTaskOnUIThread(
|
| @@ -1620,25 +1620,25 @@ void GDataFileSystem::GetFileByResourceId(
|
| ui_weak_ptr_,
|
| resource_id,
|
| CreateRelayCallback(get_file_callback),
|
| - CreateRelayCallback(get_download_data_callback)));
|
| + CreateRelayCallback(get_content_callback)));
|
| }
|
|
|
| void GDataFileSystem::GetFileByResourceIdOnUIThread(
|
| const std::string& resource_id,
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback) {
|
| + const GetContentCallback& get_content_callback) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| directory_service_->GetEntryByResourceIdAsync(resource_id,
|
| base::Bind(&GDataFileSystem::GetFileByEntryOnUIThread,
|
| ui_weak_ptr_,
|
| get_file_callback,
|
| - get_download_data_callback));
|
| + get_content_callback));
|
| }
|
|
|
| void GDataFileSystem::GetFileByEntryOnUIThread(
|
| const GetFileCallback& get_file_callback,
|
| - const GetDownloadDataCallback& get_download_data_callback,
|
| + const GetContentCallback& get_content_callback,
|
| GDataEntry* entry) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| @@ -1664,7 +1664,7 @@ void GDataFileSystem::GetFileByEntryOnUIThread(
|
| return;
|
| }
|
|
|
| - GetFileByPath(file_path, get_file_callback, get_download_data_callback);
|
| + GetFileByPath(file_path, get_file_callback, get_content_callback);
|
| }
|
|
|
| void GDataFileSystem::OnGetFileFromCache(const GetFileFromCacheParams& params,
|
| @@ -1708,7 +1708,7 @@ void GDataFileSystem::OnGetFileFromCache(const GetFileFromCacheParams& params,
|
| params.md5,
|
| params.mime_type,
|
| params.get_file_callback,
|
| - params.get_download_data_callback)));
|
| + params.get_content_callback)));
|
| }
|
|
|
| void GDataFileSystem::OnGetDocumentEntry(const FilePath& cache_file_path,
|
| @@ -1793,7 +1793,7 @@ void GDataFileSystem::StartDownloadFileIfEnoughSpace(
|
| base::Bind(&GDataFileSystem::OnFileDownloaded,
|
| ui_weak_ptr_,
|
| params),
|
| - params.get_download_data_callback);
|
| + params.get_content_callback);
|
| }
|
|
|
| void GDataFileSystem::GetEntryInfoByPath(const FilePath& file_path,
|
| @@ -3080,7 +3080,7 @@ void GDataFileSystem::OnGetEntryInfoCompleteForOpenFile(
|
| GetFileCompleteForOpenParams(
|
| entry_proto->resource_id(),
|
| entry_proto->file_specific_info().file_md5())),
|
| - GetDownloadDataCallback(),
|
| + GetContentCallback(),
|
| error,
|
| entry_proto.get());
|
| }
|
|
|