| 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 // MTPDeviceDelegateImplWin implementation. | 5 // MTPDeviceDelegateImplWin implementation. |
| 6 | 6 |
| 7 #include "chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h" | 7 #include "chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h" |
| 8 | 8 |
| 9 #include <portabledevice.h> | 9 #include <portabledevice.h> |
| 10 #include <stddef.h> |
| 10 | 11 |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/bind.h" | 14 #include "base/bind.h" |
| 14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 15 #include "base/logging.h" | 16 #include "base/logging.h" |
| 16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 17 #include "base/sequenced_task_runner.h" | 18 #include "base/sequenced_task_runner.h" |
| 18 #include "base/stl_util.h" | 19 #include "base/stl_util.h" |
| 19 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 base::Passed(&file_details)))); | 459 base::Passed(&file_details)))); |
| 459 } | 460 } |
| 460 | 461 |
| 461 bool MTPDeviceDelegateImplWin::IsStreaming() { | 462 bool MTPDeviceDelegateImplWin::IsStreaming() { |
| 462 return false; | 463 return false; |
| 463 } | 464 } |
| 464 | 465 |
| 465 void MTPDeviceDelegateImplWin::ReadBytes( | 466 void MTPDeviceDelegateImplWin::ReadBytes( |
| 466 const base::FilePath& device_file_path, | 467 const base::FilePath& device_file_path, |
| 467 const scoped_refptr<net::IOBuffer>& buf, | 468 const scoped_refptr<net::IOBuffer>& buf, |
| 468 int64 offset, | 469 int64_t offset, |
| 469 int buf_len, | 470 int buf_len, |
| 470 const ReadBytesSuccessCallback& success_callback, | 471 const ReadBytesSuccessCallback& success_callback, |
| 471 const ErrorCallback& error_callback) { | 472 const ErrorCallback& error_callback) { |
| 472 NOTREACHED(); | 473 NOTREACHED(); |
| 473 } | 474 } |
| 474 | 475 |
| 475 bool MTPDeviceDelegateImplWin::IsReadOnly() const { | 476 bool MTPDeviceDelegateImplWin::IsReadOnly() const { |
| 476 return true; | 477 return true; |
| 477 } | 478 } |
| 478 | 479 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 current_snapshot_details_->file_info(), | 693 current_snapshot_details_->file_info(), |
| 693 current_snapshot_details_->request_info().snapshot_file_path); | 694 current_snapshot_details_->request_info().snapshot_file_path); |
| 694 } else { | 695 } else { |
| 695 current_snapshot_details_->request_info().error_callback.Run( | 696 current_snapshot_details_->request_info().error_callback.Run( |
| 696 base::File::FILE_ERROR_FAILED); | 697 base::File::FILE_ERROR_FAILED); |
| 697 } | 698 } |
| 698 task_in_progress_ = false; | 699 task_in_progress_ = false; |
| 699 current_snapshot_details_.reset(); | 700 current_snapshot_details_.reset(); |
| 700 ProcessNextPendingRequest(); | 701 ProcessNextPendingRequest(); |
| 701 } | 702 } |
| OLD | NEW |