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 WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "net/base/file_stream.h" | 13 #include "net/base/file_stream.h" |
14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
15 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
16 #include "webkit/storage/webkit_storage_export.h" | 16 #include "webkit/browser/webkit_storage_browser_export.h" |
17 | 17 |
18 namespace fileapi { | 18 namespace fileapi { |
19 | 19 |
20 class FileStreamWriter; | 20 class FileStreamWriter; |
21 | 21 |
22 class WEBKIT_STORAGE_EXPORT_PRIVATE FileWriterDelegate | 22 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileWriterDelegate |
23 : public net::URLRequest::Delegate, | 23 : public net::URLRequest::Delegate, |
24 public base::SupportsWeakPtr<FileWriterDelegate> { | 24 public base::SupportsWeakPtr<FileWriterDelegate> { |
25 public: | 25 public: |
26 enum WriteProgressStatus { | 26 enum WriteProgressStatus { |
27 SUCCESS_IO_PENDING, | 27 SUCCESS_IO_PENDING, |
28 SUCCESS_COMPLETED, | 28 SUCCESS_COMPLETED, |
29 ERROR_WRITE_STARTED, | 29 ERROR_WRITE_STARTED, |
30 ERROR_WRITE_NOT_STARTED, | 30 ERROR_WRITE_NOT_STARTED, |
31 }; | 31 }; |
32 | 32 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 int bytes_written_; | 92 int bytes_written_; |
93 int bytes_read_; | 93 int bytes_read_; |
94 scoped_refptr<net::IOBufferWithSize> io_buffer_; | 94 scoped_refptr<net::IOBufferWithSize> io_buffer_; |
95 scoped_refptr<net::DrainableIOBuffer> cursor_; | 95 scoped_refptr<net::DrainableIOBuffer> cursor_; |
96 scoped_ptr<net::URLRequest> request_; | 96 scoped_ptr<net::URLRequest> request_; |
97 }; | 97 }; |
98 | 98 |
99 } // namespace fileapi | 99 } // namespace fileapi |
100 | 100 |
101 #endif // WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ | 101 #endif // WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ |
OLD | NEW |