| 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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_READ_FILE_WORKER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_READ_FILE_WORKER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_READ_FILE_WORKER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_READ_FILE_WORKER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/files/file.h" | 14 #include "base/files/file.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 | 17 |
| 18 namespace base { | |
| 19 class FilePath; | |
| 20 } | |
| 21 | |
| 22 class SnapshotFileDetails; | 18 class SnapshotFileDetails; |
| 23 struct SnapshotRequestInfo; | 19 struct SnapshotRequestInfo; |
| 24 | 20 |
| 25 // Worker class to copy the contents of the media transfer protocol(MTP) device | 21 // Worker class to copy the contents of the media transfer protocol(MTP) device |
| 26 // file to the given snapshot file. | 22 // file to the given snapshot file. |
| 27 class MTPReadFileWorker { | 23 class MTPReadFileWorker { |
| 28 public: | 24 public: |
| 29 explicit MTPReadFileWorker(const std::string& device_handle); | 25 explicit MTPReadFileWorker(const std::string& device_handle); |
| 30 ~MTPReadFileWorker(); | 26 ~MTPReadFileWorker(); |
| 31 | 27 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // The device unique identifier to query the device. | 79 // The device unique identifier to query the device. |
| 84 const std::string device_handle_; | 80 const std::string device_handle_; |
| 85 | 81 |
| 86 // For callbacks that may run after destruction. | 82 // For callbacks that may run after destruction. |
| 87 base::WeakPtrFactory<MTPReadFileWorker> weak_ptr_factory_; | 83 base::WeakPtrFactory<MTPReadFileWorker> weak_ptr_factory_; |
| 88 | 84 |
| 89 DISALLOW_COPY_AND_ASSIGN(MTPReadFileWorker); | 85 DISALLOW_COPY_AND_ASSIGN(MTPReadFileWorker); |
| 90 }; | 86 }; |
| 91 | 87 |
| 92 #endif // CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_READ_FILE_WORKER_H_ | 88 #endif // CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_READ_FILE_WORKER_H_ |
| OLD | NEW |