OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ |
7 | 7 |
8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 extensions::EventRouter* event_router, | 35 extensions::EventRouter* event_router, |
36 const ProvidedFileSystemInfo& file_system_info, | 36 const ProvidedFileSystemInfo& file_system_info, |
37 int file_handle, | 37 int file_handle, |
38 scoped_refptr<net::IOBuffer> buffer, | 38 scoped_refptr<net::IOBuffer> buffer, |
39 int64 offset, | 39 int64 offset, |
40 int length, | 40 int length, |
41 const ProvidedFileSystemInterface::ReadChunkReceivedCallback& callback); | 41 const ProvidedFileSystemInterface::ReadChunkReceivedCallback& callback); |
42 virtual ~ReadFile(); | 42 virtual ~ReadFile(); |
43 | 43 |
44 // Operation overrides. | 44 // Operation overrides. |
45 virtual bool Execute(int request_id) OVERRIDE; | 45 virtual bool Execute(int request_id) override; |
46 virtual void OnSuccess(int request_id, | 46 virtual void OnSuccess(int request_id, |
47 scoped_ptr<RequestValue> result, | 47 scoped_ptr<RequestValue> result, |
48 bool has_more) OVERRIDE; | 48 bool has_more) override; |
49 virtual void OnError(int request_id, | 49 virtual void OnError(int request_id, |
50 scoped_ptr<RequestValue> result, | 50 scoped_ptr<RequestValue> result, |
51 base::File::Error error) OVERRIDE; | 51 base::File::Error error) override; |
52 | 52 |
53 private: | 53 private: |
54 int file_handle_; | 54 int file_handle_; |
55 scoped_refptr<net::IOBuffer> buffer_; | 55 scoped_refptr<net::IOBuffer> buffer_; |
56 int64 offset_; | 56 int64 offset_; |
57 int length_; | 57 int length_; |
58 int64 current_offset_; | 58 int64 current_offset_; |
59 const ProvidedFileSystemInterface::ReadChunkReceivedCallback callback_; | 59 const ProvidedFileSystemInterface::ReadChunkReceivedCallback callback_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(ReadFile); | 61 DISALLOW_COPY_AND_ASSIGN(ReadFile); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace operations | 64 } // namespace operations |
65 } // namespace file_system_provider | 65 } // namespace file_system_provider |
66 } // namespace chromeos | 66 } // namespace chromeos |
67 | 67 |
68 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ |
OLD | NEW |