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

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

Issue 14096022: Make MountPointProvider pluggable from outside webkit/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/files/file_path.h" 8 #include "base/files/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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 g_blob_storage_controller->AppendBlobDataItem(blob_url, item); 73 g_blob_storage_controller->AppendBlobDataItem(blob_url, item);
74 g_blob_storage_controller->FinishBuildingBlob(blob_url, mime_type); 74 g_blob_storage_controller->FinishBuildingBlob(blob_url, mime_type);
75 } 75 }
76 76
77 } // namespace 77 } // namespace
78 78
79 SimpleFileSystem::SimpleFileSystem() { 79 SimpleFileSystem::SimpleFileSystem() {
80 if (file_system_dir_.CreateUniqueTempDir()) { 80 if (file_system_dir_.CreateUniqueTempDir()) {
81 file_system_context_ = new FileSystemContext( 81 file_system_context_ = new FileSystemContext(
82 FileSystemTaskRunners::CreateMockTaskRunners(), 82 FileSystemTaskRunners::CreateMockTaskRunners(),
83 fileapi::ExternalMountPoints::CreateRefCounted().get(),
84 NULL /* special storage policy */,
85 NULL /* quota manager */, 83 NULL /* quota manager */,
84 ScopedVector<fileapi::FileSystemMountPointProvider>(),
85 std::vector<fileapi::MountPoints*>(),
86 file_system_dir_.path(), 86 file_system_dir_.path(),
87 fileapi::CreateAllowFileAccessOptions()); 87 fileapi::CreateAllowFileAccessOptions());
88 } else { 88 } else {
89 LOG(WARNING) << "Failed to create a temp dir for the filesystem." 89 LOG(WARNING) << "Failed to create a temp dir for the filesystem."
90 "FileSystem feature will be disabled."; 90 "FileSystem feature will be disabled.";
91 } 91 }
92 } 92 }
93 93
94 SimpleFileSystem::~SimpleFileSystem() { 94 SimpleFileSystem::~SimpleFileSystem() {
95 } 95 }
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 const base::FilePath& platform_path, 442 const base::FilePath& platform_path,
443 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { 443 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
444 DCHECK(g_io_thread); 444 DCHECK(g_io_thread);
445 if (result == base::PLATFORM_FILE_OK) { 445 if (result == base::PLATFORM_FILE_OK) {
446 g_io_thread->PostTask( 446 g_io_thread->PostTask(
447 FROM_HERE, 447 FROM_HERE,
448 base::Bind(&RegisterBlob, blob_url, platform_path)); 448 base::Bind(&RegisterBlob, blob_url, platform_path));
449 } 449 }
450 DidGetMetadata(callbacks, result, info, platform_path); 450 DidGetMetadata(callbacks, result, info, platform_path);
451 } 451 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698