| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_SNAPSHOT_FILE_DETAILS_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_SNAPSHOT_FILE_DETAILS_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_SNAPSHOT_FILE_DETAILS_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_SNAPSHOT_FILE_DETAILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/files/file.h" | 13 #include "base/files/file.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" | 16 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" |
| 17 | 17 |
| 18 // Used to represent snapshot file request params. | 18 // Used to represent snapshot file request params. |
| 19 struct SnapshotRequestInfo { | 19 struct SnapshotRequestInfo { |
| 20 SnapshotRequestInfo( | 20 SnapshotRequestInfo( |
| 21 uint32_t file_id, | 21 uint32_t file_id, |
| 22 const base::FilePath& snapshot_file_path, | 22 const base::FilePath& snapshot_file_path, |
| 23 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback& | 23 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback& |
| 24 success_callback, | 24 success_callback, |
| 25 const MTPDeviceAsyncDelegate::ErrorCallback& error_callback); | 25 const MTPDeviceAsyncDelegate::ErrorCallback& error_callback); |
| 26 SnapshotRequestInfo(const SnapshotRequestInfo& other); |
| 26 ~SnapshotRequestInfo(); | 27 ~SnapshotRequestInfo(); |
| 27 | 28 |
| 28 // MTP device file id. | 29 // MTP device file id. |
| 29 const uint32_t file_id; | 30 const uint32_t file_id; |
| 30 | 31 |
| 31 // Local platform path of the snapshot file. | 32 // Local platform path of the snapshot file. |
| 32 const base::FilePath snapshot_file_path; | 33 const base::FilePath snapshot_file_path; |
| 33 | 34 |
| 34 // A callback to be called when CreateSnapshotFile() succeeds. | 35 // A callback to be called when CreateSnapshotFile() succeeds. |
| 35 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback | 36 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Number of bytes written into the snapshot file. | 102 // Number of bytes written into the snapshot file. |
| 102 uint32_t bytes_written_; | 103 uint32_t bytes_written_; |
| 103 | 104 |
| 104 // Whether an error occurred during file transfer. | 105 // Whether an error occurred during file transfer. |
| 105 bool error_occurred_; | 106 bool error_occurred_; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(SnapshotFileDetails); | 108 DISALLOW_COPY_AND_ASSIGN(SnapshotFileDetails); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_SNAPSHOT_FILE_DETAILS_H_ | 111 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_SNAPSHOT_FILE_DETAILS_H_ |
| OLD | NEW |