#include <vector>
#include "base/containers/hash_tables.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
-#include "base/platform_file.h"
#include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h"
// Delegate for presenting an Image Capture device through the filesystem
// MTPDeviceAsyncDelegate implementation. These functions are called on the
// IO thread by the async filesystem file util. They forward to
// similarly-named methods on the UI thread.
- virtual void GetFileInfo(
- const base::FilePath& file_path,
- const GetFileInfoSuccessCallback& success_callback,
- const ErrorCallback& error_callback) OVERRIDE;
+ void GetFileInfo(const base::FilePath& file_path,
+ const GetFileInfoSuccessCallback& success_callback,
+ const ErrorCallback& error_callback) override;
// Note: passed absolute paths, but expects relative paths in reply.
- virtual void ReadDirectory(
- const base::FilePath& root,
- const ReadDirectorySuccessCallback& success_callback,
- const ErrorCallback& error_callback) OVERRIDE;
+ void ReadDirectory(const base::FilePath& root,
+ const ReadDirectorySuccessCallback& success_callback,
+ const ErrorCallback& error_callback) override;
// Note: passed absolute paths.
- virtual void CreateSnapshotFile(
+ void CreateSnapshotFile(
const base::FilePath& device_file_path,
const base::FilePath& local_path,
const CreateSnapshotFileSuccessCallback& success_callback,
- const ErrorCallback& error_callback) OVERRIDE;
- virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE;
+ const ErrorCallback& error_callback) override;
+ bool IsStreaming() override;
+ void ReadBytes(const base::FilePath& device_file_path,
+ const scoped_refptr<net::IOBuffer>& buf,
+ int64 offset,
+ int buf_len,
+ const ReadBytesSuccessCallback& success_callback,
+ const ErrorCallback& error_callback) override;
+ void CancelPendingTasksAndDeleteDelegate() override;
// Forward delegates for ImageCaptureDeviceListener. These are
// invoked in callbacks of the ImageCapture library on the UI thread.
virtual void ItemAdded(const std::string& name,
- const base::PlatformFileInfo& info);
+ const base::File::Info& info);
virtual void NoMoreItems();
virtual void DownloadedFile(const std::string& name,
- base::PlatformFileError error);
+ base::File::Error error);
// Scheduled when early directory reads are requested. The
// timeout will signal an ABORT error to the caller if the
private:
class DeviceListener;
- virtual ~MTPDeviceDelegateImplMac();
+ ~MTPDeviceDelegateImplMac() override;
// Delegate for GetFileInfo, called on the UI thread.
void GetFileInfoImpl(const base::FilePath& file_path,
- base::PlatformFileInfo* file_info,
- base::PlatformFileError* error);
+ base::File::Info* file_info,
+ base::File::Error* error);
// Delegate for ReadDirectory, called on the UI thread.
void ReadDirectoryImpl(
// Stores a map from filename to file metadata received from the camera.
base::hash_map<base::FilePath::StringType,
- base::PlatformFileInfo> file_info_;
+ base::File::Info> file_info_;
// List of filenames received from the camera.
std::vector<base::FilePath> file_paths_;