| 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.h" | 5 #include "chrome/browser/chromeos/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/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 void FileSystem::AddObserver(FileSystemObserver* observer) { | 279 void FileSystem::AddObserver(FileSystemObserver* observer) { |
| 280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 281 observers_.AddObserver(observer); | 281 observers_.AddObserver(observer); |
| 282 } | 282 } |
| 283 | 283 |
| 284 void FileSystem::RemoveObserver(FileSystemObserver* observer) { | 284 void FileSystem::RemoveObserver(FileSystemObserver* observer) { |
| 285 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 285 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 286 observers_.RemoveObserver(observer); | 286 observers_.RemoveObserver(observer); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void FileSystem::TransferFileFromRemoteToLocal( | |
| 290 const base::FilePath& remote_src_file_path, | |
| 291 const base::FilePath& local_dest_file_path, | |
| 292 const FileOperationCallback& callback) { | |
| 293 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 294 DCHECK(!callback.is_null()); | |
| 295 copy_operation_->TransferFileFromRemoteToLocal(remote_src_file_path, | |
| 296 local_dest_file_path, | |
| 297 callback); | |
| 298 } | |
| 299 | |
| 300 void FileSystem::TransferFileFromLocalToRemote( | 289 void FileSystem::TransferFileFromLocalToRemote( |
| 301 const base::FilePath& local_src_file_path, | 290 const base::FilePath& local_src_file_path, |
| 302 const base::FilePath& remote_dest_file_path, | 291 const base::FilePath& remote_dest_file_path, |
| 303 const FileOperationCallback& callback) { | 292 const FileOperationCallback& callback) { |
| 304 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 293 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 305 DCHECK(!callback.is_null()); | 294 DCHECK(!callback.is_null()); |
| 306 copy_operation_->TransferFileFromLocalToRemote(local_src_file_path, | 295 copy_operation_->TransferFileFromLocalToRemote(local_src_file_path, |
| 307 remote_dest_file_path, | 296 remote_dest_file_path, |
| 308 callback); | 297 callback); |
| 309 } | 298 } |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 void FileSystem::OpenFile(const base::FilePath& file_path, | 946 void FileSystem::OpenFile(const base::FilePath& file_path, |
| 958 OpenMode open_mode, | 947 OpenMode open_mode, |
| 959 const OpenFileCallback& callback) { | 948 const OpenFileCallback& callback) { |
| 960 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 949 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 961 DCHECK(!callback.is_null()); | 950 DCHECK(!callback.is_null()); |
| 962 | 951 |
| 963 open_file_operation_->OpenFile(file_path, open_mode, callback); | 952 open_file_operation_->OpenFile(file_path, open_mode, callback); |
| 964 } | 953 } |
| 965 | 954 |
| 966 } // namespace drive | 955 } // namespace drive |
| OLD | NEW |