| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 new quota::MockSpecialStoragePolicy(); | 195 new quota::MockSpecialStoragePolicy(); |
| 196 | 196 |
| 197 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers; | 197 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers; |
| 198 additional_providers.push_back( | 198 additional_providers.push_back( |
| 199 new TestMediaFileSystemMountPointProvider(profile_dir_.path(), | 199 new TestMediaFileSystemMountPointProvider(profile_dir_.path(), |
| 200 file_util.Pass())); | 200 file_util.Pass())); |
| 201 | 201 |
| 202 file_system_context_ = new fileapi::FileSystemContext( | 202 file_system_context_ = new fileapi::FileSystemContext( |
| 203 fileapi::FileSystemTaskRunners::CreateMockTaskRunners(), | 203 fileapi::FileSystemTaskRunners::CreateMockTaskRunners(), |
| 204 fileapi::ExternalMountPoints::CreateRefCounted().get(), | 204 fileapi::ExternalMountPoints::CreateRefCounted().get(), |
| 205 storage_policy, | 205 storage_policy.get(), |
| 206 NULL, | 206 NULL, |
| 207 additional_providers.Pass(), | 207 additional_providers.Pass(), |
| 208 profile_dir_.path(), | 208 profile_dir_.path(), |
| 209 fileapi::CreateAllowFileAccessOptions()); | 209 fileapi::CreateAllowFileAccessOptions()); |
| 210 } | 210 } |
| 211 | 211 |
| 212 protected: | 212 protected: |
| 213 // |test_folders| must be in alphabetical order for easy verification | 213 // |test_folders| must be in alphabetical order for easy verification |
| 214 void SetupFolders(ScopedVector<TestFolder>* test_folders) { | 214 void SetupFolders(ScopedVector<TestFolder>* test_folders) { |
| 215 // Build up pmp files. | 215 // Build up pmp files. |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 new TestFolder(base::StringPrintf("folder-%05d", i), | 474 new TestFolder(base::StringPrintf("folder-%05d", i), |
| 475 date, | 475 date, |
| 476 base::StringPrintf("uid%05d", i), i % 5, i % 3)); | 476 base::StringPrintf("uid%05d", i), i % 5, i % 3)); |
| 477 } | 477 } |
| 478 | 478 |
| 479 SetupFolders(&test_folders); | 479 SetupFolders(&test_folders); |
| 480 VerifyFolderDirectoryList(test_folders); | 480 VerifyFolderDirectoryList(test_folders); |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace chrome | 483 } // namespace chrome |
| OLD | NEW |