| Index: chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader.h
|
| diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader.h b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader.h
|
| index 133317a98883f7beae53bc1036fe48ebe6447f97..60cd224c35c7822d6697e54d88f16aa5cf4e5abd 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader.h
|
| +++ b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader.h
|
| @@ -22,12 +22,6 @@ class ProvidedFileSystemInterface;
|
| // to Read().
|
| class FileStreamReader : public webkit_blob::FileStreamReader {
|
| public:
|
| - typedef base::Callback<
|
| - void(base::WeakPtr<ProvidedFileSystemInterface> file_system,
|
| - const base::FilePath& file_path,
|
| - int file_handle,
|
| - base::File::Error result)> OpenFileCompletedCallback;
|
| -
|
| FileStreamReader(fileapi::FileSystemContext* context,
|
| const fileapi::FileSystemURL& url,
|
| int64 initial_offset,
|
| @@ -43,6 +37,11 @@ class FileStreamReader : public webkit_blob::FileStreamReader {
|
| const net::Int64CompletionCallback& callback) OVERRIDE;
|
|
|
| private:
|
| + // Helper class for executing operations on the provided file system. All
|
| + // of its methods must be called on UI thread. Callbacks are called on IO
|
| + // thread.
|
| + class OperationRunner;
|
| +
|
| // State of the file stream reader.
|
| enum State { NOT_INITIALIZED, INITIALIZING, INITIALIZED, FAILED };
|
|
|
| @@ -59,9 +58,6 @@ class FileStreamReader : public webkit_blob::FileStreamReader {
|
| void OnOpenFileCompleted(
|
| const base::Closure& pending_closure,
|
| const net::Int64CompletionCallback& error_callback,
|
| - base::WeakPtr<ProvidedFileSystemInterface> file_system,
|
| - const base::FilePath& file_path,
|
| - int file_handle,
|
| base::File::Error result);
|
|
|
| // Called when initialization is completed with either a success or an error.
|
| @@ -98,13 +94,9 @@ class FileStreamReader : public webkit_blob::FileStreamReader {
|
| int64 current_offset_;
|
| int64 current_length_;
|
| base::Time expected_modification_time_;
|
| + scoped_refptr<OperationRunner> runner_;
|
| State state_;
|
|
|
| - // Set during initialization (in case of a success).
|
| - base::WeakPtr<ProvidedFileSystemInterface> file_system_;
|
| - base::FilePath file_path_;
|
| - int file_handle_;
|
| -
|
| base::WeakPtrFactory<FileStreamReader> weak_ptr_factory_;
|
| DISALLOW_COPY_AND_ASSIGN(FileStreamReader);
|
| };
|
|
|