OLD | NEW |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 g_blob_storage_controller->FinishBuildingBlob(blob_url, mime_type); | 69 g_blob_storage_controller->FinishBuildingBlob(blob_url, mime_type); |
70 } | 70 } |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 SimpleFileSystem::SimpleFileSystem() { | 74 SimpleFileSystem::SimpleFileSystem() { |
75 if (file_system_dir_.CreateUniqueTempDir()) { | 75 if (file_system_dir_.CreateUniqueTempDir()) { |
76 file_system_context_ = new FileSystemContext( | 76 file_system_context_ = new FileSystemContext( |
77 base::MessageLoopProxy::current(), | 77 base::MessageLoopProxy::current(), |
78 base::MessageLoopProxy::current(), | 78 base::MessageLoopProxy::current(), |
| 79 base::MessageLoopProxy::current(), |
79 NULL /* special storage policy */, | 80 NULL /* special storage policy */, |
80 NULL /* quota manager */, | 81 NULL /* quota manager */, |
81 file_system_dir_.path(), | 82 file_system_dir_.path(), |
82 fileapi::CreateAllowFileAccessOptions()); | 83 fileapi::CreateAllowFileAccessOptions()); |
83 } else { | 84 } else { |
84 LOG(WARNING) << "Failed to create a temp dir for the filesystem." | 85 LOG(WARNING) << "Failed to create a temp dir for the filesystem." |
85 "FileSystem feature will be disabled."; | 86 "FileSystem feature will be disabled."; |
86 } | 87 } |
87 } | 88 } |
88 | 89 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 const FilePath& platform_path, | 372 const FilePath& platform_path, |
372 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { | 373 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { |
373 DCHECK(g_io_thread); | 374 DCHECK(g_io_thread); |
374 if (result == base::PLATFORM_FILE_OK) { | 375 if (result == base::PLATFORM_FILE_OK) { |
375 g_io_thread->PostTask( | 376 g_io_thread->PostTask( |
376 FROM_HERE, | 377 FROM_HERE, |
377 base::Bind(&RegisterBlob, blob_url, platform_path)); | 378 base::Bind(&RegisterBlob, blob_url, platform_path)); |
378 } | 379 } |
379 DidGetMetadata(callbacks, result, info, platform_path); | 380 DidGetMetadata(callbacks, result, info, platform_path); |
380 } | 381 } |
OLD | NEW |