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

Side by Side Diff: content/public/test/test_file_system_context.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/public/test/test_file_system_context.h" 5 #include "content/public/test/test_file_system_context.h"
6 6
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "content/public/test/mock_special_storage_policy.h" 8 #include "content/public/test/mock_special_storage_policy.h"
9 #include "content/public/test/test_file_system_backend.h" 9 #include "content/public/test/test_file_system_backend.h"
10 #include "content/public/test/test_file_system_options.h" 10 #include "content/public/test/test_file_system_options.h"
11 #include "webkit/browser/fileapi/external_mount_points.h" 11 #include "storage/browser/fileapi/external_mount_points.h"
12 #include "webkit/browser/fileapi/file_system_backend.h" 12 #include "storage/browser/fileapi/file_system_backend.h"
13 #include "webkit/browser/fileapi/file_system_context.h" 13 #include "storage/browser/fileapi/file_system_context.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 fileapi::FileSystemContext* CreateFileSystemContextForTesting( 17 storage::FileSystemContext* CreateFileSystemContextForTesting(
18 quota::QuotaManagerProxy* quota_manager_proxy, 18 quota::QuotaManagerProxy* quota_manager_proxy,
19 const base::FilePath& base_path) { 19 const base::FilePath& base_path) {
20 ScopedVector<fileapi::FileSystemBackend> additional_providers; 20 ScopedVector<storage::FileSystemBackend> additional_providers;
21 additional_providers.push_back(new TestFileSystemBackend( 21 additional_providers.push_back(new TestFileSystemBackend(
22 base::MessageLoopProxy::current().get(), base_path)); 22 base::MessageLoopProxy::current().get(), base_path));
23 return CreateFileSystemContextWithAdditionalProvidersForTesting( 23 return CreateFileSystemContextWithAdditionalProvidersForTesting(
24 quota_manager_proxy, additional_providers.Pass(), base_path); 24 quota_manager_proxy, additional_providers.Pass(), base_path);
25 } 25 }
26 26
27 fileapi::FileSystemContext* 27 storage::FileSystemContext*
28 CreateFileSystemContextWithAdditionalProvidersForTesting( 28 CreateFileSystemContextWithAdditionalProvidersForTesting(
29 quota::QuotaManagerProxy* quota_manager_proxy, 29 quota::QuotaManagerProxy* quota_manager_proxy,
30 ScopedVector<fileapi::FileSystemBackend> additional_providers, 30 ScopedVector<storage::FileSystemBackend> additional_providers,
31 const base::FilePath& base_path) { 31 const base::FilePath& base_path) {
32 return new fileapi::FileSystemContext( 32 return new storage::FileSystemContext(
33 base::MessageLoopProxy::current().get(), 33 base::MessageLoopProxy::current().get(),
34 base::MessageLoopProxy::current().get(), 34 base::MessageLoopProxy::current().get(),
35 fileapi::ExternalMountPoints::CreateRefCounted().get(), 35 storage::ExternalMountPoints::CreateRefCounted().get(),
36 make_scoped_refptr(new MockSpecialStoragePolicy()).get(), 36 make_scoped_refptr(new MockSpecialStoragePolicy()).get(),
37 quota_manager_proxy, 37 quota_manager_proxy,
38 additional_providers.Pass(), 38 additional_providers.Pass(),
39 std::vector<fileapi::URLRequestAutoMountHandler>(), 39 std::vector<storage::URLRequestAutoMountHandler>(),
40 base_path, 40 base_path,
41 CreateAllowFileAccessOptions()); 41 CreateAllowFileAccessOptions());
42 } 42 }
43 43
44 fileapi::FileSystemContext* 44 storage::FileSystemContext* CreateFileSystemContextWithAutoMountersForTesting(
45 CreateFileSystemContextWithAutoMountersForTesting(
46 quota::QuotaManagerProxy* quota_manager_proxy, 45 quota::QuotaManagerProxy* quota_manager_proxy,
47 ScopedVector<fileapi::FileSystemBackend> additional_providers, 46 ScopedVector<storage::FileSystemBackend> additional_providers,
48 const std::vector<fileapi::URLRequestAutoMountHandler>& auto_mounters, 47 const std::vector<storage::URLRequestAutoMountHandler>& auto_mounters,
49 const base::FilePath& base_path) { 48 const base::FilePath& base_path) {
50 return new fileapi::FileSystemContext( 49 return new storage::FileSystemContext(
51 base::MessageLoopProxy::current().get(), 50 base::MessageLoopProxy::current().get(),
52 base::MessageLoopProxy::current().get(), 51 base::MessageLoopProxy::current().get(),
53 fileapi::ExternalMountPoints::CreateRefCounted().get(), 52 storage::ExternalMountPoints::CreateRefCounted().get(),
54 make_scoped_refptr(new MockSpecialStoragePolicy()).get(), 53 make_scoped_refptr(new MockSpecialStoragePolicy()).get(),
55 quota_manager_proxy, 54 quota_manager_proxy,
56 additional_providers.Pass(), 55 additional_providers.Pass(),
57 auto_mounters, 56 auto_mounters,
58 base_path, 57 base_path,
59 CreateAllowFileAccessOptions()); 58 CreateAllowFileAccessOptions());
60 } 59 }
61 60
62 fileapi::FileSystemContext* CreateIncognitoFileSystemContextForTesting( 61 storage::FileSystemContext* CreateIncognitoFileSystemContextForTesting(
63 quota::QuotaManagerProxy* quota_manager_proxy, 62 quota::QuotaManagerProxy* quota_manager_proxy,
64 const base::FilePath& base_path) { 63 const base::FilePath& base_path) {
65 ScopedVector<fileapi::FileSystemBackend> additional_providers; 64 ScopedVector<storage::FileSystemBackend> additional_providers;
66 return new fileapi::FileSystemContext( 65 return new storage::FileSystemContext(
67 base::MessageLoopProxy::current().get(), 66 base::MessageLoopProxy::current().get(),
68 base::MessageLoopProxy::current().get(), 67 base::MessageLoopProxy::current().get(),
69 fileapi::ExternalMountPoints::CreateRefCounted().get(), 68 storage::ExternalMountPoints::CreateRefCounted().get(),
70 make_scoped_refptr(new MockSpecialStoragePolicy()).get(), 69 make_scoped_refptr(new MockSpecialStoragePolicy()).get(),
71 quota_manager_proxy, 70 quota_manager_proxy,
72 additional_providers.Pass(), 71 additional_providers.Pass(),
73 std::vector<fileapi::URLRequestAutoMountHandler>(), 72 std::vector<storage::URLRequestAutoMountHandler>(),
74 base_path, 73 base_path,
75 CreateIncognitoFileSystemOptions()); 74 CreateIncognitoFileSystemOptions());
76 } 75 }
77 76
78 } // namespace content 77 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_file_system_context.h ('k') | content/public/test/test_file_system_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698