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_WRITE_FILE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_WRITE_FILE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_WRITE_FILE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_WRITE_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 WriteFile(extensions::EventRouter* event_router, | 35 WriteFile(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 storage::AsyncFileUtil::StatusCallback& callback); | 41 const storage::AsyncFileUtil::StatusCallback& callback); |
42 virtual ~WriteFile(); | 42 virtual ~WriteFile(); |
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 const storage::AsyncFileUtil::StatusCallback callback_; | 58 const storage::AsyncFileUtil::StatusCallback callback_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(WriteFile); | 60 DISALLOW_COPY_AND_ASSIGN(WriteFile); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace operations | 63 } // namespace operations |
64 } // namespace file_system_provider | 64 } // namespace file_system_provider |
65 } // namespace chromeos | 65 } // namespace chromeos |
66 | 66 |
67 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_WRITE_FILE_H_ | 67 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_WRITE_FILE_H_ |
OLD | NEW |