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

Side by Side Diff: webkit/browser/fileapi/copy_or_move_operation_delegate.h

Issue 108323004: Cosmetic change for disk flush interval in Files.app file copying. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | webkit/browser/fileapi/copy_or_move_operation_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_COPY_OR_MOVE_OPERATION_DELEGATE_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_
6 #define WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ 6 #define WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void Read(const StatusCallback& callback); 66 void Read(const StatusCallback& callback);
67 void DidRead(const StatusCallback& callback, int result); 67 void DidRead(const StatusCallback& callback, int result);
68 68
69 // Writes the content in |buffer| to |writer_|. 69 // Writes the content in |buffer| to |writer_|.
70 void Write(const StatusCallback& callback, 70 void Write(const StatusCallback& callback,
71 scoped_refptr<net::DrainableIOBuffer> buffer); 71 scoped_refptr<net::DrainableIOBuffer> buffer);
72 void DidWrite(const StatusCallback& callback, 72 void DidWrite(const StatusCallback& callback,
73 scoped_refptr<net::DrainableIOBuffer> buffer, int result); 73 scoped_refptr<net::DrainableIOBuffer> buffer, int result);
74 74
75 // Flushes the written content in |writer_|. 75 // Flushes the written content in |writer_|.
76 void Flush(const StatusCallback& callback); 76 void Flush(const StatusCallback& callback, bool is_eof);
77 void DidFlush(const StatusCallback& callback, int result); 77 void DidFlush(const StatusCallback& callback, bool is_eof, int result);
78 78
79 scoped_ptr<webkit_blob::FileStreamReader> reader_; 79 scoped_ptr<webkit_blob::FileStreamReader> reader_;
80 scoped_ptr<FileStreamWriter> writer_; 80 scoped_ptr<FileStreamWriter> writer_;
81 const bool need_flush_; 81 const bool need_flush_;
82 FileSystemOperation::CopyFileProgressCallback file_progress_callback_; 82 FileSystemOperation::CopyFileProgressCallback file_progress_callback_;
83 scoped_refptr<net::IOBufferWithSize> io_buffer_; 83 scoped_refptr<net::IOBufferWithSize> io_buffer_;
84 int64 num_copied_bytes_; 84 int64 num_copied_bytes_;
85 int64 previous_flush_;
kinuko 2013/12/13 10:42:01 nit: previous_flush_ -> previous_flush_offset_ or
kinaba 2013/12/14 05:14:19 sg. done.
85 base::Time last_progress_callback_invocation_time_; 86 base::Time last_progress_callback_invocation_time_;
86 base::TimeDelta min_progress_callback_invocation_span_; 87 base::TimeDelta min_progress_callback_invocation_span_;
87 bool cancel_requested_; 88 bool cancel_requested_;
88 base::WeakPtrFactory<StreamCopyHelper> weak_factory_; 89 base::WeakPtrFactory<StreamCopyHelper> weak_factory_;
89 DISALLOW_COPY_AND_ASSIGN(StreamCopyHelper); 90 DISALLOW_COPY_AND_ASSIGN(StreamCopyHelper);
90 }; 91 };
91 92
92 CopyOrMoveOperationDelegate( 93 CopyOrMoveOperationDelegate(
93 FileSystemContext* file_system_context, 94 FileSystemContext* file_system_context,
94 const FileSystemURL& src_root, 95 const FileSystemURL& src_root,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 153
153 std::set<CopyOrMoveImpl*> running_copy_set_; 154 std::set<CopyOrMoveImpl*> running_copy_set_;
154 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; 155 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); 157 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate);
157 }; 158 };
158 159
159 } // namespace fileapi 160 } // namespace fileapi
160 161
161 #endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ 162 #endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/browser/fileapi/copy_or_move_operation_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698