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

Side by Side Diff: webkit/tools/test_shell/simple_file_system.cc

Issue 3599011: Add truncate and cancel for FileWriter; write and tests will come in later CL... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « webkit/glue/plugins/pepper_file_system.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "webkit/tools/test_shell/simple_file_system.h" 5 #include "webkit/tools/test_shell/simple_file_system.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebFileInfo.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebFileInfo.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 virtual void DidOpenFileSystem(const std::string&, const FilePath&) { 86 virtual void DidOpenFileSystem(const std::string&, const FilePath&) {
87 NOTREACHED(); 87 NOTREACHED();
88 } 88 }
89 89
90 virtual void DidFail(base::PlatformFileError error_code) { 90 virtual void DidFail(base::PlatformFileError error_code) {
91 callbacks_->didFail(PlatformFileErrorToWebFileError(error_code)); 91 callbacks_->didFail(PlatformFileErrorToWebFileError(error_code));
92 file_system_->RemoveCompletedOperation(request_id_); 92 file_system_->RemoveCompletedOperation(request_id_);
93 } 93 }
94 94
95 virtual void DidWrite(int64, bool, fileapi::FileSystemOperation*) { 95 virtual void DidWrite(int64, bool) {
96 NOTREACHED(); 96 NOTREACHED();
97 } 97 }
98 98
99 private: 99 private:
100 SimpleFileSystem* file_system_; 100 SimpleFileSystem* file_system_;
101 WebFileSystemCallbacks* callbacks_; 101 WebFileSystemCallbacks* callbacks_;
102 int request_id_; 102 int request_id_;
103 }; 103 };
104 104
105 } // namespace 105 } // namespace
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 fileapi::FileSystemOperation* operation = new fileapi::FileSystemOperation( 186 fileapi::FileSystemOperation* operation = new fileapi::FileSystemOperation(
187 dispatcher, base::MessageLoopProxy::CreateForCurrentThread()); 187 dispatcher, base::MessageLoopProxy::CreateForCurrentThread());
188 int32 request_id = operations_.Add(operation); 188 int32 request_id = operations_.Add(operation);
189 dispatcher->set_request_id(request_id); 189 dispatcher->set_request_id(request_id);
190 return operation; 190 return operation;
191 } 191 }
192 192
193 void SimpleFileSystem::RemoveCompletedOperation(int request_id) { 193 void SimpleFileSystem::RemoveCompletedOperation(int request_id) {
194 operations_.Remove(request_id); 194 operations_.Remove(request_id);
195 } 195 }
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_file_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698