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

Side by Side Diff: storage/browser/fileapi/file_system_operation_runner.h

Issue 810403004: [Storage] Blob Storage Refactoring pt 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: memory leak fixed Created 5 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ 5 #ifndef STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_
6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ 6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // Removes a file or directory at |url|. If |recursive| is true, remove 105 // Removes a file or directory at |url|. If |recursive| is true, remove
106 // all files and directories under the directory at |url| recursively. 106 // all files and directories under the directory at |url| recursively.
107 OperationID Remove(const FileSystemURL& url, bool recursive, 107 OperationID Remove(const FileSystemURL& url, bool recursive,
108 const StatusCallback& callback); 108 const StatusCallback& callback);
109 109
110 // Writes contents of |blob_url| to |url| at |offset|. 110 // Writes contents of |blob_url| to |url| at |offset|.
111 // |url_request_context| is used to read contents in |blob|. 111 // |url_request_context| is used to read contents in |blob|.
112 OperationID Write(const net::URLRequestContext* url_request_context, 112 OperationID Write(const net::URLRequestContext* url_request_context,
113 const FileSystemURL& url, 113 const FileSystemURL& url,
114 scoped_ptr<storage::BlobDataHandle> blob, 114 scoped_ptr<storage::BlobDataSnapshotHandle> blob,
115 int64 offset, 115 int64 offset,
116 const WriteCallback& callback); 116 const WriteCallback& callback);
117 117
118 // Truncates a file at |url| to |length|. If |length| is larger than 118 // Truncates a file at |url| to |length|. If |length| is larger than
119 // the original file size, the file will be extended, and the extended 119 // the original file size, the file will be extended, and the extended
120 // part is filled with null bytes. 120 // part is filled with null bytes.
121 OperationID Truncate(const FileSystemURL& url, int64 length, 121 OperationID Truncate(const FileSystemURL& url, int64 length,
122 const StatusCallback& callback); 122 const StatusCallback& callback);
123 123
124 // Tries to cancel the operation |id| [we support cancelling write or 124 // Tries to cancel the operation |id| [we support cancelling write or
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 // Callbacks for stray cancels whose target operation is already finished. 314 // Callbacks for stray cancels whose target operation is already finished.
315 std::map<OperationID, StatusCallback> stray_cancel_callbacks_; 315 std::map<OperationID, StatusCallback> stray_cancel_callbacks_;
316 316
317 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner); 317 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner);
318 }; 318 };
319 319
320 } // namespace storage 320 } // namespace storage
321 321
322 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ 322 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698