| 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.h" | 8 #include "base/files/file.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/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/browser/webkit_storage_browser_export.h" | 16 #include "webkit/browser/storage_export.h" |
| 17 | 17 |
| 18 namespace storage { | 18 namespace storage { |
| 19 | 19 |
| 20 class FileStreamWriter; | 20 class FileStreamWriter; |
| 21 | 21 |
| 22 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileWriterDelegate | 22 class STORAGE_EXPORT_PRIVATE FileWriterDelegate |
| 23 : public net::URLRequest::Delegate { | 23 : public net::URLRequest::Delegate { |
| 24 public: | 24 public: |
| 25 enum FlushPolicy { | 25 enum FlushPolicy { |
| 26 FLUSH_ON_COMPLETION, | 26 FLUSH_ON_COMPLETION, |
| 27 NO_FLUSH_ON_COMPLETION, | 27 NO_FLUSH_ON_COMPLETION, |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 enum WriteProgressStatus { | 30 enum WriteProgressStatus { |
| 31 SUCCESS_IO_PENDING, | 31 SUCCESS_IO_PENDING, |
| 32 SUCCESS_COMPLETED, | 32 SUCCESS_COMPLETED, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 scoped_ptr<net::URLRequest> request_; | 101 scoped_ptr<net::URLRequest> request_; |
| 102 | 102 |
| 103 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; | 103 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(FileWriterDelegate); | 105 DISALLOW_COPY_AND_ASSIGN(FileWriterDelegate); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace storage | 108 } // namespace storage |
| 109 | 109 |
| 110 #endif // WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ | 110 #endif // WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ |
| OLD | NEW |