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