| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/drive/file_system_util.h" | 5 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 122 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 123 | 123 |
| 124 scoped_refptr<storage::ExternalMountPoints> mount_points = | 124 scoped_refptr<storage::ExternalMountPoints> mount_points = |
| 125 storage::ExternalMountPoints::CreateRefCounted(); | 125 storage::ExternalMountPoints::CreateRefCounted(); |
| 126 scoped_refptr<storage::FileSystemContext> context( | 126 scoped_refptr<storage::FileSystemContext> context( |
| 127 new storage::FileSystemContext( | 127 new storage::FileSystemContext( |
| 128 base::ThreadTaskRunnerHandle::Get().get(), | 128 base::ThreadTaskRunnerHandle::Get().get(), |
| 129 base::ThreadTaskRunnerHandle::Get().get(), mount_points.get(), | 129 base::ThreadTaskRunnerHandle::Get().get(), mount_points.get(), |
| 130 NULL, // special_storage_policy | 130 NULL, // special_storage_policy |
| 131 NULL, // quota_manager_proxy, | 131 NULL, // quota_manager_proxy, |
| 132 ScopedVector<storage::FileSystemBackend>(), | 132 std::vector<std::unique_ptr<storage::FileSystemBackend>>(), |
| 133 std::vector<storage::URLRequestAutoMountHandler>(), | 133 std::vector<storage::URLRequestAutoMountHandler>(), |
| 134 temp_dir_.GetPath(), // partition_path | 134 temp_dir_.GetPath(), // partition_path |
| 135 content::CreateAllowFileAccessOptions())); | 135 content::CreateAllowFileAccessOptions())); |
| 136 | 136 |
| 137 // Type:"external" + virtual_path:"drive/foo/bar" resolves to "drive/foo/bar". | 137 // Type:"external" + virtual_path:"drive/foo/bar" resolves to "drive/foo/bar". |
| 138 const std::string& drive_mount_name = | 138 const std::string& drive_mount_name = |
| 139 GetDriveMountPointPath(&profile).BaseName().AsUTF8Unsafe(); | 139 GetDriveMountPointPath(&profile).BaseName().AsUTF8Unsafe(); |
| 140 mount_points->RegisterFileSystem( | 140 mount_points->RegisterFileSystem( |
| 141 drive_mount_name, storage::kFileSystemTypeDrive, | 141 drive_mount_name, storage::kFileSystemTypeDrive, |
| 142 storage::FileSystemMountOption(), GetDriveMountPointPath(&profile)); | 142 storage::FileSystemMountOption(), GetDriveMountPointPath(&profile)); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 TEST_F(ProfileRelatedFileSystemUtilTest, GetCacheRootPath) { | 180 TEST_F(ProfileRelatedFileSystemUtilTest, GetCacheRootPath) { |
| 181 TestingProfile profile; | 181 TestingProfile profile; |
| 182 base::FilePath profile_path = profile.GetPath(); | 182 base::FilePath profile_path = profile.GetPath(); |
| 183 EXPECT_EQ(profile_path.AppendASCII("GCache/v1"), | 183 EXPECT_EQ(profile_path.AppendASCII("GCache/v1"), |
| 184 util::GetCacheRootPath(&profile)); | 184 util::GetCacheRootPath(&profile)); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace util | 187 } // namespace util |
| 188 } // namespace drive | 188 } // namespace drive |
| OLD | NEW |