OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "storage/browser/fileapi/copy_or_move_operation_delegate.h" | 5 #include "storage/browser/fileapi/copy_or_move_operation_delegate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 void Cancel() override { | 399 void Cancel() override { |
400 cancel_requested_ = true; | 400 cancel_requested_ = true; |
401 if (copy_helper_) | 401 if (copy_helper_) |
402 copy_helper_->Cancel(); | 402 copy_helper_->Cancel(); |
403 } | 403 } |
404 | 404 |
405 private: | 405 private: |
406 void NotifyOnStartUpdate(const FileSystemURL& url) { | 406 void NotifyOnStartUpdate(const FileSystemURL& url) { |
407 if (file_system_context_->GetUpdateObservers(url.type())) { | 407 if (file_system_context_->GetUpdateObservers(url.type())) { |
408 file_system_context_->GetUpdateObservers(url.type()) | 408 file_system_context_->GetUpdateObservers(url.type()) |
409 ->Notify(&FileUpdateObserver::OnStartUpdate, MakeTuple(url)); | 409 ->Notify(&FileUpdateObserver::OnStartUpdate, base::MakeTuple(url)); |
410 } | 410 } |
411 } | 411 } |
412 | 412 |
413 void NotifyOnModifyFile(const FileSystemURL& url) { | 413 void NotifyOnModifyFile(const FileSystemURL& url) { |
414 if (file_system_context_->GetChangeObservers(url.type())) { | 414 if (file_system_context_->GetChangeObservers(url.type())) { |
415 file_system_context_->GetChangeObservers(url.type()) | 415 file_system_context_->GetChangeObservers(url.type()) |
416 ->Notify(&FileChangeObserver::OnModifyFile, MakeTuple(url)); | 416 ->Notify(&FileChangeObserver::OnModifyFile, base::MakeTuple(url)); |
417 } | 417 } |
418 } | 418 } |
419 | 419 |
420 void NotifyOnEndUpdate(const FileSystemURL& url) { | 420 void NotifyOnEndUpdate(const FileSystemURL& url) { |
421 if (file_system_context_->GetUpdateObservers(url.type())) { | 421 if (file_system_context_->GetUpdateObservers(url.type())) { |
422 file_system_context_->GetUpdateObservers(url.type()) | 422 file_system_context_->GetUpdateObservers(url.type()) |
423 ->Notify(&FileUpdateObserver::OnEndUpdate, MakeTuple(url)); | 423 ->Notify(&FileUpdateObserver::OnEndUpdate, base::MakeTuple(url)); |
424 } | 424 } |
425 } | 425 } |
426 | 426 |
427 void RunAfterGetMetadataForSource( | 427 void RunAfterGetMetadataForSource( |
428 const CopyOrMoveOperationDelegate::StatusCallback& callback, | 428 const CopyOrMoveOperationDelegate::StatusCallback& callback, |
429 base::File::Error error, | 429 base::File::Error error, |
430 const base::File::Info& file_info) { | 430 const base::File::Info& file_info) { |
431 if (cancel_requested_) | 431 if (cancel_requested_) |
432 error = base::File::FILE_ERROR_ABORT; | 432 error = base::File::FILE_ERROR_ABORT; |
433 | 433 |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 base::FilePath relative = dest_root_.virtual_path(); | 1016 base::FilePath relative = dest_root_.virtual_path(); |
1017 src_root_.virtual_path().AppendRelativePath(src_url.virtual_path(), | 1017 src_root_.virtual_path().AppendRelativePath(src_url.virtual_path(), |
1018 &relative); | 1018 &relative); |
1019 return file_system_context()->CreateCrackedFileSystemURL( | 1019 return file_system_context()->CreateCrackedFileSystemURL( |
1020 dest_root_.origin(), | 1020 dest_root_.origin(), |
1021 dest_root_.mount_type(), | 1021 dest_root_.mount_type(), |
1022 relative); | 1022 relative); |
1023 } | 1023 } |
1024 | 1024 |
1025 } // namespace storage | 1025 } // namespace storage |
OLD | NEW |