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

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

Issue 10855034: Drive: Remove gdata_params.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review (#16) fix & rebase 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 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());
}
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698