| 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/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 additional_providers.push_back(new MediaFileSystemBackend( | 126 additional_providers.push_back(new MediaFileSystemBackend( |
| 127 data_dir_.path(), base::MessageLoopProxy::current().get())); | 127 data_dir_.path(), base::MessageLoopProxy::current().get())); |
| 128 | 128 |
| 129 file_system_context_ = new fileapi::FileSystemContext( | 129 file_system_context_ = new fileapi::FileSystemContext( |
| 130 base::MessageLoopProxy::current().get(), | 130 base::MessageLoopProxy::current().get(), |
| 131 base::MessageLoopProxy::current().get(), | 131 base::MessageLoopProxy::current().get(), |
| 132 fileapi::ExternalMountPoints::CreateRefCounted().get(), | 132 fileapi::ExternalMountPoints::CreateRefCounted().get(), |
| 133 storage_policy.get(), | 133 storage_policy.get(), |
| 134 NULL, | 134 NULL, |
| 135 additional_providers.Pass(), | 135 additional_providers.Pass(), |
| 136 std::vector<fileapi::URLRequestAutoMountHandler>(), |
| 136 data_dir_.path(), | 137 data_dir_.path(), |
| 137 content::CreateAllowFileAccessOptions()); | 138 content::CreateAllowFileAccessOptions()); |
| 138 | 139 |
| 139 filesystem_id_ = isolated_context()->RegisterFileSystemForPath( | 140 filesystem_id_ = isolated_context()->RegisterFileSystemForPath( |
| 140 fileapi::kFileSystemTypeNativeMedia, root_path(), NULL); | 141 fileapi::kFileSystemTypeNativeMedia, root_path(), NULL); |
| 141 | 142 |
| 142 isolated_context()->AddReference(filesystem_id_); | 143 isolated_context()->AddReference(filesystem_id_); |
| 143 } | 144 } |
| 144 | 145 |
| 145 virtual void TearDown() { | 146 virtual void TearDown() { |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 expected_error = base::File::FILE_OK; | 564 expected_error = base::File::FILE_OK; |
| 564 else | 565 else |
| 565 expected_error = base::File::FILE_ERROR_SECURITY; | 566 expected_error = base::File::FILE_ERROR_SECURITY; |
| 566 error = base::File::FILE_ERROR_FAILED; | 567 error = base::File::FILE_ERROR_FAILED; |
| 567 operation_runner()->CreateSnapshotFile(url, | 568 operation_runner()->CreateSnapshotFile(url, |
| 568 base::Bind(CreateSnapshotCallback, &error)); | 569 base::Bind(CreateSnapshotCallback, &error)); |
| 569 base::MessageLoop::current()->RunUntilIdle(); | 570 base::MessageLoop::current()->RunUntilIdle(); |
| 570 ASSERT_EQ(expected_error, error); | 571 ASSERT_EQ(expected_error, error); |
| 571 } | 572 } |
| 572 } | 573 } |
| OLD | NEW |