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

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

Issue 10197007: Change webkit/{fileapi,quota} code to use TaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 8 years, 7 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/quota/usage_tracker.cc ('k') | webkit/tools/test_shell/simple_file_writer.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) 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 #include "webkit/tools/test_shell/simple_file_system.h" 5 #include "webkit/tools/test_shell/simple_file_system.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 // static 194 // static
195 void SimpleFileSystem::CleanupOnIOThread() { 195 void SimpleFileSystem::CleanupOnIOThread() {
196 g_io_thread = NULL; 196 g_io_thread = NULL;
197 g_blob_storage_controller = NULL; 197 g_blob_storage_controller = NULL;
198 } 198 }
199 199
200 FileSystemOperationInterface* SimpleFileSystem::GetNewOperation( 200 FileSystemOperationInterface* SimpleFileSystem::GetNewOperation(
201 const WebURL& url) { 201 const WebURL& url) {
202 return file_system_context_->CreateFileSystemOperation( 202 return file_system_context_->CreateFileSystemOperation(GURL(url));
203 GURL(url),
204 base::MessageLoopProxy::current());
205 } 203 }
206 204
207 FileSystemOperationInterface::StatusCallback 205 FileSystemOperationInterface::StatusCallback
208 SimpleFileSystem::FinishHandler(WebFileSystemCallbacks* callbacks) { 206 SimpleFileSystem::FinishHandler(WebFileSystemCallbacks* callbacks) {
209 return base::Bind(&SimpleFileSystem::DidFinish, 207 return base::Bind(&SimpleFileSystem::DidFinish,
210 AsWeakPtr(), base::Unretained(callbacks)); 208 AsWeakPtr(), base::Unretained(callbacks));
211 } 209 }
212 210
213 FileSystemOperationInterface::ReadDirectoryCallback 211 FileSystemOperationInterface::ReadDirectoryCallback
214 SimpleFileSystem::ReadDirectoryHandler(WebFileSystemCallbacks* callbacks) { 212 SimpleFileSystem::ReadDirectoryHandler(WebFileSystemCallbacks* callbacks) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 const FilePath& platform_path, 302 const FilePath& platform_path,
305 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { 303 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
306 DCHECK(g_io_thread); 304 DCHECK(g_io_thread);
307 if (result == base::PLATFORM_FILE_OK) { 305 if (result == base::PLATFORM_FILE_OK) {
308 g_io_thread->PostTask( 306 g_io_thread->PostTask(
309 FROM_HERE, 307 FROM_HERE,
310 base::Bind(&RegisterBlob, blob_url, platform_path)); 308 base::Bind(&RegisterBlob, blob_url, platform_path));
311 } 309 }
312 DidGetMetadata(callbacks, result, info, platform_path); 310 DidGetMetadata(callbacks, result, info, platform_path);
313 } 311 }
OLDNEW
« no previous file with comments | « webkit/quota/usage_tracker.cc ('k') | webkit/tools/test_shell/simple_file_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698