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>(), | |
137 data_dir_.path(), | 136 data_dir_.path(), |
138 content::CreateAllowFileAccessOptions()); | 137 content::CreateAllowFileAccessOptions()); |
139 | 138 |
140 filesystem_id_ = isolated_context()->RegisterFileSystemForPath( | 139 filesystem_id_ = isolated_context()->RegisterFileSystemForPath( |
141 fileapi::kFileSystemTypeNativeMedia, root_path(), NULL); | 140 fileapi::kFileSystemTypeNativeMedia, root_path(), NULL); |
142 | 141 |
143 isolated_context()->AddReference(filesystem_id_); | 142 isolated_context()->AddReference(filesystem_id_); |
144 } | 143 } |
145 | 144 |
146 virtual void TearDown() { | 145 virtual void TearDown() { |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 expected_error = base::File::FILE_OK; | 563 expected_error = base::File::FILE_OK; |
565 else | 564 else |
566 expected_error = base::File::FILE_ERROR_SECURITY; | 565 expected_error = base::File::FILE_ERROR_SECURITY; |
567 error = base::File::FILE_ERROR_FAILED; | 566 error = base::File::FILE_ERROR_FAILED; |
568 operation_runner()->CreateSnapshotFile(url, | 567 operation_runner()->CreateSnapshotFile(url, |
569 base::Bind(CreateSnapshotCallback, &error)); | 568 base::Bind(CreateSnapshotCallback, &error)); |
570 base::MessageLoop::current()->RunUntilIdle(); | 569 base::MessageLoop::current()->RunUntilIdle(); |
571 ASSERT_EQ(expected_error, error); | 570 ASSERT_EQ(expected_error, error); |
572 } | 571 } |
573 } | 572 } |
OLD | NEW |