| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 observer, | 85 observer, |
| 86 scheduler, | 86 scheduler, |
| 87 metadata, | 87 metadata, |
| 88 cache)), | 88 cache)), |
| 89 download_operation_(new DownloadOperation(blocking_task_runner, | 89 download_operation_(new DownloadOperation(blocking_task_runner, |
| 90 observer, | 90 observer, |
| 91 scheduler, | 91 scheduler, |
| 92 metadata, | 92 metadata, |
| 93 cache, | 93 cache, |
| 94 temporary_file_directory)), | 94 temporary_file_directory)), |
| 95 move_operation_(new MoveOperation(observer, scheduler, metadata)), | 95 move_operation_(new MoveOperation(blocking_task_runner, |
| 96 observer, |
| 97 scheduler, |
| 98 metadata)), |
| 96 weak_ptr_factory_(this) { | 99 weak_ptr_factory_(this) { |
| 97 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 98 } | 101 } |
| 99 | 102 |
| 100 CopyOperation::~CopyOperation() { | 103 CopyOperation::~CopyOperation() { |
| 101 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 102 } | 105 } |
| 103 | 106 |
| 104 void CopyOperation::Copy(const base::FilePath& src_file_path, | 107 void CopyOperation::Copy(const base::FilePath& src_file_path, |
| 105 const base::FilePath& dest_file_path, | 108 const base::FilePath& dest_file_path, |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 // Drop the document extension, which should not be | 508 // Drop the document extension, which should not be |
| 506 // in the document title. | 509 // in the document title. |
| 507 // TODO(yoshiki): Remove this code with crbug.com/223304. | 510 // TODO(yoshiki): Remove this code with crbug.com/223304. |
| 508 remote_dest_file_path.RemoveExtension(), | 511 remote_dest_file_path.RemoveExtension(), |
| 509 canonicalized_resource_id, | 512 canonicalized_resource_id, |
| 510 callback); | 513 callback); |
| 511 } | 514 } |
| 512 | 515 |
| 513 } // namespace file_system | 516 } // namespace file_system |
| 514 } // namespace drive | 517 } // namespace drive |
| OLD | NEW |