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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 gdata::RunTaskOnUIThread(base::Bind(&DriveFileSystem::MoveOnUIThread, | 1010 gdata::RunTaskOnUIThread(base::Bind(&DriveFileSystem::MoveOnUIThread, |
1011 ui_weak_ptr_, | 1011 ui_weak_ptr_, |
1012 src_file_path, | 1012 src_file_path, |
1013 dest_file_path, | 1013 dest_file_path, |
1014 gdata::CreateRelayCallback(callback))); | 1014 gdata::CreateRelayCallback(callback))); |
1015 } | 1015 } |
1016 | 1016 |
1017 void DriveFileSystem::MoveOnUIThread(const FilePath& src_file_path, | 1017 void DriveFileSystem::MoveOnUIThread(const FilePath& src_file_path, |
1018 const FilePath& dest_file_path, | 1018 const FilePath& dest_file_path, |
1019 const FileOperationCallback& callback) { | 1019 const FileOperationCallback& callback) { |
1020 drive_operations_.Move(src_file_path, dest_file_path, callback); | 1020 scheduler_->Move(src_file_path, dest_file_path, callback); |
1021 } | 1021 } |
1022 | 1022 |
1023 void DriveFileSystem::MoveEntryFromRootDirectory( | 1023 void DriveFileSystem::MoveEntryFromRootDirectory( |
1024 const FilePath& directory_path, | 1024 const FilePath& directory_path, |
1025 const FileOperationCallback& callback, | 1025 const FileOperationCallback& callback, |
1026 DriveFileError error, | 1026 DriveFileError error, |
1027 const FilePath& file_path) { | 1027 const FilePath& file_path) { |
1028 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1028 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1029 DCHECK(!callback.is_null()); | 1029 DCHECK(!callback.is_null()); |
1030 DCHECK_EQ(kDriveRootDirectory, file_path.DirName().value()); | 1030 DCHECK_EQ(kDriveRootDirectory, file_path.DirName().value()); |
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3013 return; | 3013 return; |
3014 } | 3014 } |
3015 | 3015 |
3016 PlatformFileInfoProto entry_file_info; | 3016 PlatformFileInfoProto entry_file_info; |
3017 DriveEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); | 3017 DriveEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); |
3018 *entry_proto->mutable_file_info() = entry_file_info; | 3018 *entry_proto->mutable_file_info() = entry_file_info; |
3019 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); | 3019 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); |
3020 } | 3020 } |
3021 | 3021 |
3022 } // namespace drive | 3022 } // namespace drive |
OLD | NEW |