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/drive_file_system.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 base::Bind(&DriveFileSystem::MoveOnUIThread, | 600 base::Bind(&DriveFileSystem::MoveOnUIThread, |
601 ui_weak_ptr_, | 601 ui_weak_ptr_, |
602 src_file_path, | 602 src_file_path, |
603 dest_file_path, | 603 dest_file_path, |
604 google_apis::CreateRelayCallback(callback))); | 604 google_apis::CreateRelayCallback(callback))); |
605 } | 605 } |
606 | 606 |
607 void DriveFileSystem::MoveOnUIThread(const FilePath& src_file_path, | 607 void DriveFileSystem::MoveOnUIThread(const FilePath& src_file_path, |
608 const FilePath& dest_file_path, | 608 const FilePath& dest_file_path, |
609 const FileOperationCallback& callback) { | 609 const FileOperationCallback& callback) { |
610 drive_operations_.Move(src_file_path, dest_file_path, callback); | 610 scheduler_->Move(src_file_path, dest_file_path, callback); |
611 } | 611 } |
612 | 612 |
613 void DriveFileSystem::Remove(const FilePath& file_path, | 613 void DriveFileSystem::Remove(const FilePath& file_path, |
614 bool is_recursive, | 614 bool is_recursive, |
615 const FileOperationCallback& callback) { | 615 const FileOperationCallback& callback) { |
616 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || | 616 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || |
617 BrowserThread::CurrentlyOn(BrowserThread::IO)); | 617 BrowserThread::CurrentlyOn(BrowserThread::IO)); |
618 DCHECK(!callback.is_null()); | 618 DCHECK(!callback.is_null()); |
619 | 619 |
620 google_apis::RunTaskOnUIThread( | 620 google_apis::RunTaskOnUIThread( |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2493 return; | 2493 return; |
2494 } | 2494 } |
2495 | 2495 |
2496 PlatformFileInfoProto entry_file_info; | 2496 PlatformFileInfoProto entry_file_info; |
2497 DriveEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); | 2497 DriveEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); |
2498 *entry_proto->mutable_file_info() = entry_file_info; | 2498 *entry_proto->mutable_file_info() = entry_file_info; |
2499 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); | 2499 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); |
2500 } | 2500 } |
2501 | 2501 |
2502 } // namespace drive | 2502 } // namespace drive |
OLD | NEW |