| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 protected: | 122 protected: |
| 123 void SetupNewContext(const FileSystemOptions& options) { | 123 void SetupNewContext(const FileSystemOptions& options) { |
| 124 scoped_refptr<ExternalMountPoints> external_mount_points( | 124 scoped_refptr<ExternalMountPoints> external_mount_points( |
| 125 ExternalMountPoints::CreateRefCounted()); | 125 ExternalMountPoints::CreateRefCounted()); |
| 126 file_system_context_ = new FileSystemContext( | 126 file_system_context_ = new FileSystemContext( |
| 127 FileSystemTaskRunners::CreateMockTaskRunners(), | 127 FileSystemTaskRunners::CreateMockTaskRunners(), |
| 128 external_mount_points.get(), | 128 external_mount_points.get(), |
| 129 special_storage_policy_, | 129 special_storage_policy_, |
| 130 NULL, | 130 NULL, |
| 131 ScopedVector<FileSystemMountPointProvider>(), |
| 131 data_dir_.path(), | 132 data_dir_.path(), |
| 132 options); | 133 options); |
| 133 #if defined(OS_CHROMEOS) | 134 #if defined(OS_CHROMEOS) |
| 134 base::FilePath mount_point_path = base::FilePath(kMountPoint); | 135 base::FilePath mount_point_path = base::FilePath(kMountPoint); |
| 135 external_mount_points->RegisterFileSystem( | 136 external_mount_points->RegisterFileSystem( |
| 136 mount_point_path.BaseName().AsUTF8Unsafe(), | 137 mount_point_path.BaseName().AsUTF8Unsafe(), |
| 137 kFileSystemTypeNativeLocal, | 138 kFileSystemTypeNativeLocal, |
| 138 mount_point_path); | 139 mount_point_path); |
| 139 #endif | 140 #endif |
| 140 } | 141 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 kRootPathFileURITestCases[i].type, | 298 kRootPathFileURITestCases[i].type, |
| 298 true /* create */, &root_path)); | 299 true /* create */, &root_path)); |
| 299 base::FilePath expected = file_system_path().AppendASCII( | 300 base::FilePath expected = file_system_path().AppendASCII( |
| 300 kRootPathFileURITestCases[i].expected_path); | 301 kRootPathFileURITestCases[i].expected_path); |
| 301 EXPECT_EQ(expected.value(), root_path.value()); | 302 EXPECT_EQ(expected.value(), root_path.value()); |
| 302 EXPECT_TRUE(file_util::DirectoryExists(root_path)); | 303 EXPECT_TRUE(file_util::DirectoryExists(root_path)); |
| 303 } | 304 } |
| 304 } | 305 } |
| 305 | 306 |
| 306 } // namespace fileapi | 307 } // namespace fileapi |
| OLD | NEW |