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/file_system_provider/fileapi/provider_async_fi
le_util.h" | 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi
le_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 async_file_util_.reset(new internal::ProviderAsyncFileUtil); | 128 async_file_util_.reset(new internal::ProviderAsyncFileUtil); |
129 | 129 |
130 file_system_context_ = | 130 file_system_context_ = |
131 content::CreateFileSystemContextForTesting(NULL, data_dir_.path()); | 131 content::CreateFileSystemContextForTesting(NULL, data_dir_.path()); |
132 | 132 |
133 ServiceFactory::GetInstance()->SetTestingFactory(profile_, &CreateService); | 133 ServiceFactory::GetInstance()->SetTestingFactory(profile_, &CreateService); |
134 Service* service = Service::Get(profile_); // Owned by its factory. | 134 Service* service = Service::Get(profile_); // Owned by its factory. |
135 service->SetFileSystemFactoryForTesting( | 135 service->SetFileSystemFactoryForTesting( |
136 base::Bind(&FakeProvidedFileSystem::Create)); | 136 base::Bind(&FakeProvidedFileSystem::Create)); |
137 | 137 |
138 const bool result = service->MountFileSystem(kExtensionId, | 138 const bool result = |
139 kFileSystemId, | 139 service->MountFileSystem(kExtensionId, |
140 "Testing File System", | 140 kFileSystemId, |
141 false /* writable */); | 141 "Testing File System", |
| 142 false /* writable */, |
| 143 false /* supports_notify_tag */); |
142 ASSERT_TRUE(result); | 144 ASSERT_TRUE(result); |
143 const ProvidedFileSystemInfo& file_system_info = | 145 const ProvidedFileSystemInfo& file_system_info = |
144 service->GetProvidedFileSystem(kExtensionId, kFileSystemId) | 146 service->GetProvidedFileSystem(kExtensionId, kFileSystemId) |
145 ->GetFileSystemInfo(); | 147 ->GetFileSystemInfo(); |
146 const std::string mount_point_name = | 148 const std::string mount_point_name = |
147 file_system_info.mount_path().BaseName().AsUTF8Unsafe(); | 149 file_system_info.mount_path().BaseName().AsUTF8Unsafe(); |
148 | 150 |
149 file_url_ = | 151 file_url_ = |
150 CreateFileSystemURL(mount_point_name, | 152 CreateFileSystemURL(mount_point_name, |
151 base::FilePath::FromUTF8Unsafe( | 153 base::FilePath::FromUTF8Unsafe( |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 file_url_, | 421 file_url_, |
420 base::Bind(&EventLogger::OnCreateSnapshotFile, | 422 base::Bind(&EventLogger::OnCreateSnapshotFile, |
421 base::Unretained(&logger))); | 423 base::Unretained(&logger))); |
422 | 424 |
423 ASSERT_TRUE(logger.result()); | 425 ASSERT_TRUE(logger.result()); |
424 EXPECT_EQ(base::File::FILE_ERROR_INVALID_OPERATION, *logger.result()); | 426 EXPECT_EQ(base::File::FILE_ERROR_INVALID_OPERATION, *logger.result()); |
425 } | 427 } |
426 | 428 |
427 } // namespace file_system_provider | 429 } // namespace file_system_provider |
428 } // namespace chromeos | 430 } // namespace chromeos |
OLD | NEW |