| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/basictypes.h" | 5 #include <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
| 6 #include "base/bind.h" | 8 #include "base/bind.h" |
| 7 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 11 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 12 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 13 #include "content/public/test/async_file_test_helper.h" | 16 #include "content/public/test/async_file_test_helper.h" |
| 14 #include "content/public/test/mock_special_storage_policy.h" | 17 #include "content/public/test/mock_special_storage_policy.h" |
| 15 #include "content/public/test/test_file_system_backend.h" | 18 #include "content/public/test/test_file_system_backend.h" |
| 16 #include "content/public/test/test_file_system_context.h" | 19 #include "content/public/test/test_file_system_context.h" |
| 17 #include "storage/browser/blob/shareable_file_reference.h" | 20 #include "storage/browser/blob/shareable_file_reference.h" |
| 18 #include "storage/browser/fileapi/copy_or_move_file_validator.h" | 21 #include "storage/browser/fileapi/copy_or_move_file_validator.h" |
| 19 #include "storage/browser/fileapi/external_mount_points.h" | 22 #include "storage/browser/fileapi/external_mount_points.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 return result; | 157 return result; |
| 155 return AsyncFileTestHelper::TruncateFile( | 158 return AsyncFileTestHelper::TruncateFile( |
| 156 file_system_context_.get(), url, size); | 159 file_system_context_.get(), url, size); |
| 157 } | 160 } |
| 158 | 161 |
| 159 base::File::Error CreateDirectory(const FileSystemURL& url) { | 162 base::File::Error CreateDirectory(const FileSystemURL& url) { |
| 160 return AsyncFileTestHelper::CreateDirectory(file_system_context_.get(), | 163 return AsyncFileTestHelper::CreateDirectory(file_system_context_.get(), |
| 161 url); | 164 url); |
| 162 } | 165 } |
| 163 | 166 |
| 164 bool FileExists(const FileSystemURL& url, int64 expected_size) { | 167 bool FileExists(const FileSystemURL& url, int64_t expected_size) { |
| 165 return AsyncFileTestHelper::FileExists( | 168 return AsyncFileTestHelper::FileExists( |
| 166 file_system_context_.get(), url, expected_size); | 169 file_system_context_.get(), url, expected_size); |
| 167 } | 170 } |
| 168 | 171 |
| 169 base::ScopedTempDir base_; | 172 base::ScopedTempDir base_; |
| 170 | 173 |
| 171 const GURL origin_; | 174 const GURL origin_; |
| 172 | 175 |
| 173 const storage::FileSystemType src_type_; | 176 const storage::FileSystemType src_type_; |
| 174 const storage::FileSystemType dest_type_; | 177 const storage::FileSystemType dest_type_; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 helper.SetUp(); | 326 helper.SetUp(); |
| 324 scoped_ptr<CopyOrMoveFileValidatorFactory> factory( | 327 scoped_ptr<CopyOrMoveFileValidatorFactory> factory( |
| 325 new TestCopyOrMoveFileValidatorFactory(POST_WRITE_INVALID)); | 328 new TestCopyOrMoveFileValidatorFactory(POST_WRITE_INVALID)); |
| 326 helper.SetMediaCopyOrMoveFileValidatorFactory(factory.Pass()); | 329 helper.SetMediaCopyOrMoveFileValidatorFactory(factory.Pass()); |
| 327 | 330 |
| 328 helper.CopyTest(base::File::FILE_ERROR_SECURITY); | 331 helper.CopyTest(base::File::FILE_ERROR_SECURITY); |
| 329 helper.MoveTest(base::File::FILE_ERROR_SECURITY); | 332 helper.MoveTest(base::File::FILE_ERROR_SECURITY); |
| 330 } | 333 } |
| 331 | 334 |
| 332 } // namespace content | 335 } // namespace content |
| OLD | NEW |