Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: webkit/fileapi/file_writer_delegate.h

Issue 10447055: Move fileapi into its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes and use FILEAPI_EXPORT_PRIVATE Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_FILEAPI_FILE_WRITER_DELEGATE_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_
6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ 6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_
7 7
8 #include "base/file_path.h" 8 #include "base/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/fileapi/fileapi_export.h"
16 #include "webkit/fileapi/file_system_operation_interface.h" 17 #include "webkit/fileapi/file_system_operation_interface.h"
17 #include "webkit/fileapi/file_system_path.h" 18 #include "webkit/fileapi/file_system_path.h"
18 19
19 namespace fileapi { 20 namespace fileapi {
20 21
21 class FileSystemOperationContext; 22 class FileSystemOperationContext;
22 class FileSystemQuotaUtil; 23 class FileSystemQuotaUtil;
23 class FileWriter; 24 class FileWriter;
24 25
25 class FileWriterDelegate : public net::URLRequest::Delegate { 26 class FILEAPI_EXPORT_PRIVATE FileWriterDelegate
27 : public net::URLRequest::Delegate {
26 public: 28 public:
27 FileWriterDelegate( 29 FileWriterDelegate(
28 const FileSystemOperationInterface::WriteCallback& write_callback, 30 const FileSystemOperationInterface::WriteCallback& write_callback,
29 scoped_ptr<FileWriter> file_writer); 31 scoped_ptr<FileWriter> file_writer);
30 virtual ~FileWriterDelegate(); 32 virtual ~FileWriterDelegate();
31 33
32 void Start(scoped_ptr<net::URLRequest> request); 34 void Start(scoped_ptr<net::URLRequest> request);
33 35
34 // Cancels the current write operation. Returns true if it is ok to 36 // Cancels the current write operation. Returns true if it is ok to
35 // delete this instance immediately. Otherwise this will call 37 // delete this instance immediately. Otherwise this will call
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 int bytes_read_; 77 int bytes_read_;
76 scoped_refptr<net::IOBufferWithSize> io_buffer_; 78 scoped_refptr<net::IOBufferWithSize> io_buffer_;
77 scoped_refptr<net::DrainableIOBuffer> cursor_; 79 scoped_refptr<net::DrainableIOBuffer> cursor_;
78 scoped_ptr<net::URLRequest> request_; 80 scoped_ptr<net::URLRequest> request_;
79 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; 81 base::WeakPtrFactory<FileWriterDelegate> weak_factory_;
80 }; 82 };
81 83
82 } // namespace fileapi 84 } // namespace fileapi
83 85
84 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ 86 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698