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

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

Issue 11030044: Merge 159454 - Flush at the end of local file writing in FileWriter API. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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_SANDBOX_FILE_STREAM_WRITER_H_ 5 #ifndef WEBKIT_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
6 #define WEBKIT_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 6 #define WEBKIT_FILEAPI_SANDBOX_FILE_STREAM_WRITER_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/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 16 matching lines...) Expand all
27 SandboxFileStreamWriter(FileSystemContext* file_system_context, 27 SandboxFileStreamWriter(FileSystemContext* file_system_context,
28 const FileSystemURL& url, 28 const FileSystemURL& url,
29 int64 initial_offset, 29 int64 initial_offset,
30 const UpdateObserverList& observers); 30 const UpdateObserverList& observers);
31 virtual ~SandboxFileStreamWriter(); 31 virtual ~SandboxFileStreamWriter();
32 32
33 // FileStreamWriter overrides. 33 // FileStreamWriter overrides.
34 virtual int Write(net::IOBuffer* buf, int buf_len, 34 virtual int Write(net::IOBuffer* buf, int buf_len,
35 const net::CompletionCallback& callback) OVERRIDE; 35 const net::CompletionCallback& callback) OVERRIDE;
36 virtual int Cancel(const net::CompletionCallback& callback) OVERRIDE; 36 virtual int Cancel(const net::CompletionCallback& callback) OVERRIDE;
37 virtual int Flush(const net::CompletionCallback& callback) OVERRIDE;
37 38
38 // Used only by tests. 39 // Used only by tests.
39 void set_default_quota(int64 quota) { 40 void set_default_quota(int64 quota) {
40 default_quota_ = quota; 41 default_quota_ = quota;
41 } 42 }
42 43
43 private: 44 private:
44 // Performs quota calculation and calls local_file_writer_->Write(). 45 // Performs quota calculation and calls local_file_writer_->Write().
45 int WriteInternal(net::IOBuffer* buf, int buf_len, 46 int WriteInternal(net::IOBuffer* buf, int buf_len,
46 const net::CompletionCallback& callback); 47 const net::CompletionCallback& callback);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 int64 default_quota_; 82 int64 default_quota_;
82 83
83 base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_; 84 base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_;
84 85
85 DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter); 86 DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter);
86 }; 87 };
87 88
88 } // namespace fileapi 89 } // namespace fileapi
89 90
90 #endif // WEBKIT_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 91 #endif // WEBKIT_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_stream_writer.cc ('k') | webkit/fileapi/sandbox_file_stream_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698