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/copy_operation.h" | 5 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 internal::FileCache* cache, | 219 internal::FileCache* cache, |
220 const ResourceIdCanonicalizer& id_canonicalizer) | 220 const ResourceIdCanonicalizer& id_canonicalizer) |
221 : blocking_task_runner_(blocking_task_runner), | 221 : blocking_task_runner_(blocking_task_runner), |
222 observer_(observer), | 222 observer_(observer), |
223 scheduler_(scheduler), | 223 scheduler_(scheduler), |
224 metadata_(metadata), | 224 metadata_(metadata), |
225 cache_(cache), | 225 cache_(cache), |
226 id_canonicalizer_(id_canonicalizer), | 226 id_canonicalizer_(id_canonicalizer), |
227 create_file_operation_(new CreateFileOperation(blocking_task_runner, | 227 create_file_operation_(new CreateFileOperation(blocking_task_runner, |
228 observer, | 228 observer, |
229 scheduler, | 229 metadata)), |
230 metadata, | |
231 cache)), | |
232 weak_ptr_factory_(this) { | 230 weak_ptr_factory_(this) { |
233 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 231 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
234 } | 232 } |
235 | 233 |
236 CopyOperation::~CopyOperation() { | 234 CopyOperation::~CopyOperation() { |
237 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 235 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
238 } | 236 } |
239 | 237 |
240 void CopyOperation::Copy(const base::FilePath& src_file_path, | 238 void CopyOperation::Copy(const base::FilePath& src_file_path, |
241 const base::FilePath& dest_file_path, | 239 const base::FilePath& dest_file_path, |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 516 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
519 DCHECK(!callback.is_null()); | 517 DCHECK(!callback.is_null()); |
520 | 518 |
521 if (error == FILE_ERROR_OK) | 519 if (error == FILE_ERROR_OK) |
522 observer_->OnEntryUpdatedByOperation(*local_id); | 520 observer_->OnEntryUpdatedByOperation(*local_id); |
523 callback.Run(error); | 521 callback.Run(error); |
524 } | 522 } |
525 | 523 |
526 } // namespace file_system | 524 } // namespace file_system |
527 } // namespace drive | 525 } // namespace drive |
OLD | NEW |