OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/drive/file_system/drive_operations.h" | 5 #include "chrome/browser/chromeos/drive/file_system/drive_operations.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h" | 8 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h" |
9 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h
" | 9 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h
" |
10 #include "chrome/browser/chromeos/drive/file_system/move_operation.h" | 10 #include "chrome/browser/chromeos/drive/file_system/move_operation.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 DriveOperations::~DriveOperations() { | 24 DriveOperations::~DriveOperations() { |
25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
26 } | 26 } |
27 | 27 |
28 void DriveOperations::Init( | 28 void DriveOperations::Init( |
29 DriveScheduler* drive_scheduler, | 29 DriveScheduler* drive_scheduler, |
30 DriveFileSystemInterface* drive_file_system, | 30 DriveFileSystemInterface* drive_file_system, |
31 DriveCache* cache, | 31 DriveCache* cache, |
32 DriveResourceMetadata* metadata, | 32 DriveResourceMetadata* metadata, |
33 google_apis::DriveUploaderInterface* uploader, | |
34 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, | 33 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, |
35 OperationObserver* observer) { | 34 OperationObserver* observer) { |
36 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
37 | 36 |
38 copy_operation_.reset(new file_system::CopyOperation(drive_scheduler, | 37 copy_operation_.reset(new file_system::CopyOperation(drive_scheduler, |
39 drive_file_system, | 38 drive_file_system, |
40 metadata, | 39 metadata, |
41 blocking_task_runner, | 40 blocking_task_runner, |
42 observer)); | 41 observer)); |
43 create_directory_operation_.reset( | 42 create_directory_operation_.reset( |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 DriveClientContext context, | 149 DriveClientContext context, |
151 const FileOperationCallback& callback) { | 150 const FileOperationCallback& callback) { |
152 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
153 DCHECK(!callback.is_null()); | 152 DCHECK(!callback.is_null()); |
154 | 153 |
155 update_operation_->UpdateFileByResourceId(resource_id, context, callback); | 154 update_operation_->UpdateFileByResourceId(resource_id, context, callback); |
156 } | 155 } |
157 | 156 |
158 } // namespace file_system | 157 } // namespace file_system |
159 } // namespace drive | 158 } // namespace drive |
OLD | NEW |