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

Side by Side Diff: webkit/browser/fileapi/mock_file_system_context.cc

Issue 20989003: Deprecate FileSystemTaskRunners (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 4 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/fileapi/mock_file_system_context.h" 5 #include "webkit/browser/fileapi/mock_file_system_context.h"
6 6
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "webkit/browser/fileapi/external_mount_points.h" 8 #include "webkit/browser/fileapi/external_mount_points.h"
9 #include "webkit/browser/fileapi/file_system_backend.h" 9 #include "webkit/browser/fileapi/file_system_backend.h"
10 #include "webkit/browser/fileapi/file_system_context.h" 10 #include "webkit/browser/fileapi/file_system_context.h"
11 #include "webkit/browser/fileapi/file_system_task_runners.h"
12 #include "webkit/browser/fileapi/mock_file_system_options.h" 11 #include "webkit/browser/fileapi/mock_file_system_options.h"
13 #include "webkit/browser/fileapi/test_file_system_backend.h" 12 #include "webkit/browser/fileapi/test_file_system_backend.h"
14 #include "webkit/browser/quota/mock_special_storage_policy.h" 13 #include "webkit/browser/quota/mock_special_storage_policy.h"
15 14
16 namespace fileapi { 15 namespace fileapi {
17 16
18 FileSystemContext* CreateFileSystemContextForTesting( 17 FileSystemContext* CreateFileSystemContextForTesting(
19 quota::QuotaManagerProxy* quota_manager_proxy, 18 quota::QuotaManagerProxy* quota_manager_proxy,
20 const base::FilePath& base_path) { 19 const base::FilePath& base_path) {
21 ScopedVector<FileSystemBackend> additional_providers; 20 ScopedVector<FileSystemBackend> additional_providers;
22 additional_providers.push_back(new TestFileSystemBackend( 21 additional_providers.push_back(new TestFileSystemBackend(
23 base::MessageLoopProxy::current().get(), base_path)); 22 base::MessageLoopProxy::current().get(), base_path));
24 return CreateFileSystemContextWithAdditionalProvidersForTesting( 23 return CreateFileSystemContextWithAdditionalProvidersForTesting(
25 quota_manager_proxy, additional_providers.Pass(), base_path); 24 quota_manager_proxy, additional_providers.Pass(), base_path);
26 } 25 }
27 26
28 FileSystemContext* CreateFileSystemContextWithAdditionalProvidersForTesting( 27 FileSystemContext* CreateFileSystemContextWithAdditionalProvidersForTesting(
29 quota::QuotaManagerProxy* quota_manager_proxy, 28 quota::QuotaManagerProxy* quota_manager_proxy,
30 ScopedVector<FileSystemBackend> additional_providers, 29 ScopedVector<FileSystemBackend> additional_providers,
31 const base::FilePath& base_path) { 30 const base::FilePath& base_path) {
32 return new FileSystemContext( 31 return new FileSystemContext(
33 FileSystemTaskRunners::CreateMockTaskRunners(), 32 base::MessageLoopProxy::current().get(),
33 base::MessageLoopProxy::current().get(),
34 ExternalMountPoints::CreateRefCounted().get(), 34 ExternalMountPoints::CreateRefCounted().get(),
35 make_scoped_refptr(new quota::MockSpecialStoragePolicy()).get(), 35 make_scoped_refptr(new quota::MockSpecialStoragePolicy()).get(),
36 quota_manager_proxy, 36 quota_manager_proxy,
37 additional_providers.Pass(), 37 additional_providers.Pass(),
38 base_path, 38 base_path,
39 CreateAllowFileAccessOptions()); 39 CreateAllowFileAccessOptions());
40 } 40 }
41 41
42 } // namespace fileapi 42 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/isolated_file_util_unittest.cc ('k') | webkit/browser/fileapi/obfuscated_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698