OLD | NEW |
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 "webkit/browser/fileapi/file_system_context.h" | 5 #include "webkit/browser/fileapi/file_system_context.h" |
6 | 6 |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "content/public/test/test_file_system_options.h" | 10 #include "content/public/test/test_file_system_options.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 new quota::MockQuotaManager(false /* is_incognito */, | 59 new quota::MockQuotaManager(false /* is_incognito */, |
60 data_dir_.path(), | 60 data_dir_.path(), |
61 base::MessageLoopProxy::current().get(), | 61 base::MessageLoopProxy::current().get(), |
62 base::MessageLoopProxy::current().get(), | 62 base::MessageLoopProxy::current().get(), |
63 storage_policy_.get()); | 63 storage_policy_.get()); |
64 } | 64 } |
65 | 65 |
66 protected: | 66 protected: |
67 FileSystemContext* CreateFileSystemContextForTest( | 67 FileSystemContext* CreateFileSystemContextForTest( |
68 fileapi::ExternalMountPoints* external_mount_points) { | 68 fileapi::ExternalMountPoints* external_mount_points) { |
69 return new FileSystemContext(base::MessageLoopProxy::current().get(), | 69 return new FileSystemContext( |
70 base::MessageLoopProxy::current().get(), | 70 base::MessageLoopProxy::current().get(), |
71 external_mount_points, | 71 base::MessageLoopProxy::current().get(), |
72 storage_policy_.get(), | 72 external_mount_points, |
73 mock_quota_manager_->proxy(), | 73 storage_policy_.get(), |
74 ScopedVector<FileSystemBackend>(), | 74 mock_quota_manager_->proxy(), |
75 data_dir_.path(), | 75 ScopedVector<FileSystemBackend>(), |
76 CreateAllowFileAccessOptions()); | 76 std::vector<fileapi::URLRequestAutoMountHandler>(), |
| 77 data_dir_.path(), |
| 78 CreateAllowFileAccessOptions()); |
77 } | 79 } |
78 | 80 |
79 // Verifies a *valid* filesystem url has expected values. | 81 // Verifies a *valid* filesystem url has expected values. |
80 void ExpectFileSystemURLMatches(const FileSystemURL& url, | 82 void ExpectFileSystemURLMatches(const FileSystemURL& url, |
81 const GURL& expect_origin, | 83 const GURL& expect_origin, |
82 FileSystemType expect_mount_type, | 84 FileSystemType expect_mount_type, |
83 FileSystemType expect_type, | 85 FileSystemType expect_type, |
84 const base::FilePath& expect_path, | 86 const base::FilePath& expect_path, |
85 const base::FilePath& expect_virtual_path, | 87 const base::FilePath& expect_virtual_path, |
86 const std::string& expect_filesystem_id) { | 88 const std::string& expect_filesystem_id) { |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 EXPECT_TRUE(context->CanServeURLRequest(cracked_url)); | 377 EXPECT_TRUE(context->CanServeURLRequest(cracked_url)); |
376 | 378 |
377 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( | 379 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( |
378 kExternalMountName); | 380 kExternalMountName); |
379 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id); | 381 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id); |
380 } | 382 } |
381 | 383 |
382 } // namespace | 384 } // namespace |
383 | 385 |
384 } // namespace content | 386 } // namespace content |
OLD | NEW |