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

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

Issue 10920087: Update callers of CreateFileSystemOperation so more detailed error codes can be returned. Where app… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 8 years, 3 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 #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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 bool SimpleFileSystem::HasFilePermission( 265 bool SimpleFileSystem::HasFilePermission(
266 const fileapi::FileSystemURL& url, FilePermission permission) { 266 const fileapi::FileSystemURL& url, FilePermission permission) {
267 // Disallow writing on dragged file system, otherwise return ok. 267 // Disallow writing on dragged file system, otherwise return ok.
268 return (url.type() != fileapi::kFileSystemTypeDragged || 268 return (url.type() != fileapi::kFileSystemTypeDragged ||
269 permission == FILE_PERMISSION_READ); 269 permission == FILE_PERMISSION_READ);
270 } 270 }
271 271
272 FileSystemOperation* SimpleFileSystem::GetNewOperation( 272 FileSystemOperation* SimpleFileSystem::GetNewOperation(
273 const fileapi::FileSystemURL& url) { 273 const fileapi::FileSystemURL& url) {
274 return file_system_context_->CreateFileSystemOperation(url); 274 return file_system_context_->CreateFileSystemOperation(url, NULL);
275 } 275 }
276 276
277 FileSystemOperation::StatusCallback 277 FileSystemOperation::StatusCallback
278 SimpleFileSystem::FinishHandler(WebFileSystemCallbacks* callbacks) { 278 SimpleFileSystem::FinishHandler(WebFileSystemCallbacks* callbacks) {
279 return base::Bind(&SimpleFileSystem::DidFinish, 279 return base::Bind(&SimpleFileSystem::DidFinish,
280 AsWeakPtr(), base::Unretained(callbacks)); 280 AsWeakPtr(), base::Unretained(callbacks));
281 } 281 }
282 282
283 FileSystemOperation::ReadDirectoryCallback 283 FileSystemOperation::ReadDirectoryCallback
284 SimpleFileSystem::ReadDirectoryHandler(WebFileSystemCallbacks* callbacks) { 284 SimpleFileSystem::ReadDirectoryHandler(WebFileSystemCallbacks* callbacks) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 const FilePath& platform_path, 389 const FilePath& platform_path,
390 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { 390 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
391 DCHECK(g_io_thread); 391 DCHECK(g_io_thread);
392 if (result == base::PLATFORM_FILE_OK) { 392 if (result == base::PLATFORM_FILE_OK) {
393 g_io_thread->PostTask( 393 g_io_thread->PostTask(
394 FROM_HERE, 394 FROM_HERE,
395 base::Bind(&RegisterBlob, blob_url, platform_path)); 395 base::Bind(&RegisterBlob, blob_url, platform_path));
396 } 396 }
397 DidGetMetadata(callbacks, result, info, platform_path); 397 DidGetMetadata(callbacks, result, info, platform_path);
398 } 398 }
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_file_stream_writer.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