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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "webkit/fileapi/external_mount_points.h" | 15 #include "webkit/fileapi/external_mount_points.h" |
16 #include "webkit/fileapi/file_system_context.h" | 16 #include "webkit/fileapi/file_system_context.h" |
| 17 #include "webkit/fileapi/file_system_mount_point_provider.h" |
17 #include "webkit/fileapi/file_system_operation.h" | 18 #include "webkit/fileapi/file_system_operation.h" |
18 #include "webkit/fileapi/file_system_task_runners.h" | 19 #include "webkit/fileapi/file_system_task_runners.h" |
19 #include "webkit/fileapi/file_system_url.h" | 20 #include "webkit/fileapi/file_system_url.h" |
20 #include "webkit/fileapi/isolated_context.h" | 21 #include "webkit/fileapi/isolated_context.h" |
21 #include "webkit/fileapi/media/native_media_file_util.h" | 22 #include "webkit/fileapi/media/native_media_file_util.h" |
22 #include "webkit/fileapi/mock_file_system_options.h" | 23 #include "webkit/fileapi/mock_file_system_options.h" |
23 #include "webkit/fileapi/native_file_util.h" | 24 #include "webkit/fileapi/native_file_util.h" |
24 #include "webkit/quota/mock_special_storage_policy.h" | 25 #include "webkit/quota/mock_special_storage_policy.h" |
25 | 26 |
26 #define FPL(x) FILE_PATH_LITERAL(x) | 27 #define FPL(x) FILE_PATH_LITERAL(x) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 111 |
111 scoped_refptr<quota::SpecialStoragePolicy> storage_policy = | 112 scoped_refptr<quota::SpecialStoragePolicy> storage_policy = |
112 new quota::MockSpecialStoragePolicy(); | 113 new quota::MockSpecialStoragePolicy(); |
113 | 114 |
114 file_system_context_ = | 115 file_system_context_ = |
115 new FileSystemContext( | 116 new FileSystemContext( |
116 FileSystemTaskRunners::CreateMockTaskRunners(), | 117 FileSystemTaskRunners::CreateMockTaskRunners(), |
117 ExternalMountPoints::CreateRefCounted().get(), | 118 ExternalMountPoints::CreateRefCounted().get(), |
118 storage_policy, | 119 storage_policy, |
119 NULL, | 120 NULL, |
| 121 ScopedVector<FileSystemMountPointProvider>(), |
120 data_dir_.path(), | 122 data_dir_.path(), |
121 CreateAllowFileAccessOptions()); | 123 CreateAllowFileAccessOptions()); |
122 | 124 |
123 file_util_ = file_system_context_->GetFileUtil(kFileSystemTypeNativeMedia); | 125 file_util_ = file_system_context_->GetFileUtil(kFileSystemTypeNativeMedia); |
124 | 126 |
125 filesystem_id_ = isolated_context()->RegisterFileSystemForPath( | 127 filesystem_id_ = isolated_context()->RegisterFileSystemForPath( |
126 kFileSystemTypeNativeMedia, root_path(), NULL); | 128 kFileSystemTypeNativeMedia, root_path(), NULL); |
127 | 129 |
128 isolated_context()->AddReference(filesystem_id_); | 130 isolated_context()->AddReference(filesystem_id_); |
129 } | 131 } |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 expectation = base::PLATFORM_FILE_ERROR_FAILED; | 594 expectation = base::PLATFORM_FILE_ERROR_FAILED; |
593 } | 595 } |
594 operation->TouchFile( | 596 operation->TouchFile( |
595 url, time, time, base::Bind(&ExpectEqHelper, test_name, expectation)); | 597 url, time, time, base::Bind(&ExpectEqHelper, test_name, expectation)); |
596 MessageLoop::current()->RunUntilIdle(); | 598 MessageLoop::current()->RunUntilIdle(); |
597 } | 599 } |
598 } | 600 } |
599 } | 601 } |
600 | 602 |
601 } // namespace fileapi | 603 } // namespace fileapi |
OLD | NEW |