diff options
Diffstat (limited to 'chrome/browser/chromeos/drive/drive_scheduler.cc')
-rw-r--r-- | chrome/browser/chromeos/drive/drive_scheduler.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/drive/drive_scheduler.cc b/chrome/browser/chromeos/drive/drive_scheduler.cc index aa91c18..aece264 100644 --- a/chrome/browser/chromeos/drive/drive_scheduler.cc +++ b/chrome/browser/chromeos/drive/drive_scheduler.cc @@ -76,6 +76,19 @@ void DriveScheduler::Initialize() { initialized_ = true; } +void DriveScheduler::GetApplicationInfo( + const google_apis::GetDataCallback& callback) { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + + scoped_ptr<QueueEntry> new_job( + new QueueEntry(TYPE_GET_APPLICATION_INFO, FilePath())); + new_job->get_data_callback = callback; + + QueueJob(new_job.Pass()); + + StartJobLoop(); +} + void DriveScheduler::Copy(const FilePath& src_file_path, const FilePath& dest_file_path, const FileOperationCallback& callback) { @@ -233,6 +246,14 @@ void DriveScheduler::DoJobLoop() { const QueueEntry* queue_entry = job_iter->second.get(); switch (job_info.job_type) { + case TYPE_GET_APPLICATION_INFO: { + drive_service_->GetApplicationInfo( + base::Bind(&DriveScheduler::OnGetDataJobDone, + weak_ptr_factory_.GetWeakPtr(), + job_id)); + } + break; + case TYPE_COPY: { drive_operations_->Copy( job_info.file_path, |