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

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

Issue 10640006: gdata: Stop getting GDataUploader via GDataSystemService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add OVERRIDE Created 8 years, 6 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 230ae9d49bae60efc56e8b11d81a45648c661b31..2d17cca77293ec0b58a867f32e2305bbce2b85c4 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -692,9 +692,11 @@ GDataFileSystem::GDataFileSystem(
Profile* profile,
GDataCache* cache,
DocumentsServiceInterface* documents_service,
+ GDataUploaderInterface* uploader,
const base::SequencedWorkerPool::SequenceToken& sequence_token)
: profile_(profile),
cache_(cache),
+ uploader_(uploader),
documents_service_(documents_service),
update_timer_(true /* retain_user_task */, true /* is_repeating */),
hide_hosted_docs_(false),
@@ -1127,14 +1129,6 @@ void GDataFileSystem::StartFileUploadOnUIThread(
DCHECK(error);
DCHECK(upload_file_info);
- GDataSystemService* service =
- GDataSystemServiceFactory::GetForProfile(profile_);
-
- if (*error == base::PLATFORM_FILE_OK) {
- if (!service)
- *error = base::PLATFORM_FILE_ERROR_FAILED;
- }
-
if (*error != base::PLATFORM_FILE_OK) {
if (!callback.is_null())
callback.Run(*error);
@@ -1147,7 +1141,7 @@ void GDataFileSystem::StartFileUploadOnUIThread(
ui_weak_ptr_,
callback);
- service->uploader()->UploadFile(scoped_ptr<UploadFileInfo>(upload_file_info));
+ uploader_->UploadFile(scoped_ptr<UploadFileInfo>(upload_file_info));
}
void GDataFileSystem::OnTransferCompleted(
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698