| 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 "storage/browser/fileapi/file_system_operation_impl.h" | 5 #include "storage/browser/fileapi/file_system_operation_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "content/browser/fileapi/mock_file_change_observer.h" | 15 #include "content/browser/fileapi/mock_file_change_observer.h" |
| 16 #include "content/browser/fileapi/mock_file_update_observer.h" | 16 #include "content/browser/fileapi/mock_file_update_observer.h" |
| 17 #include "content/browser/quota/mock_quota_manager.h" | 17 #include "content/browser/quota/mock_quota_manager.h" |
| 18 #include "content/browser/quota/mock_quota_manager_proxy.h" | 18 #include "content/browser/quota/mock_quota_manager_proxy.h" |
| 19 #include "content/public/test/async_file_test_helper.h" | 19 #include "content/public/test/async_file_test_helper.h" |
| 20 #include "content/public/test/sandbox_file_system_test_helper.h" | 20 #include "content/public/test/sandbox_file_system_test_helper.h" |
| 21 #include "storage/browser/blob/shareable_file_reference.h" |
| 21 #include "storage/browser/fileapi/file_system_context.h" | 22 #include "storage/browser/fileapi/file_system_context.h" |
| 22 #include "storage/browser/fileapi/file_system_file_util.h" | 23 #include "storage/browser/fileapi/file_system_file_util.h" |
| 23 #include "storage/browser/fileapi/file_system_operation_context.h" | 24 #include "storage/browser/fileapi/file_system_operation_context.h" |
| 24 #include "storage/browser/fileapi/file_system_operation_runner.h" | 25 #include "storage/browser/fileapi/file_system_operation_runner.h" |
| 25 #include "storage/browser/fileapi/sandbox_file_system_backend.h" | 26 #include "storage/browser/fileapi/sandbox_file_system_backend.h" |
| 26 #include "storage/browser/quota/quota_manager.h" | 27 #include "storage/browser/quota/quota_manager.h" |
| 27 #include "storage/browser/quota/quota_manager_proxy.h" | 28 #include "storage/browser/quota/quota_manager_proxy.h" |
| 28 #include "storage/common/blob/shareable_file_reference.h" | |
| 29 #include "storage/common/fileapi/file_system_util.h" | 29 #include "storage/common/fileapi/file_system_util.h" |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 31 #include "url/gurl.h" | 31 #include "url/gurl.h" |
| 32 | 32 |
| 33 using content::AsyncFileTestHelper; | 33 using content::AsyncFileTestHelper; |
| 34 using storage::FileSystemOperation; | 34 using storage::FileSystemOperation; |
| 35 using storage::FileSystemOperationContext; | 35 using storage::FileSystemOperationContext; |
| 36 using storage::FileSystemOperationRunner; | 36 using storage::FileSystemOperationRunner; |
| 37 using storage::FileSystemURL; | 37 using storage::FileSystemURL; |
| 38 using storage::QuotaManager; | 38 using storage::QuotaManager; |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 FileSystemURL src_file(CreateFile("src")); | 1288 FileSystemURL src_file(CreateFile("src")); |
| 1289 FileSystemURL dest_file(CreateFile("dest")); | 1289 FileSystemURL dest_file(CreateFile("dest")); |
| 1290 | 1290 |
| 1291 EXPECT_EQ(base::File::FILE_OK, Truncate(dest_file, 6)); | 1291 EXPECT_EQ(base::File::FILE_OK, Truncate(dest_file, 6)); |
| 1292 EXPECT_EQ(base::File::FILE_OK, | 1292 EXPECT_EQ(base::File::FILE_OK, |
| 1293 Copy(src_file, dest_file, FileSystemOperation::OPTION_NONE)); | 1293 Copy(src_file, dest_file, FileSystemOperation::OPTION_NONE)); |
| 1294 EXPECT_EQ(0, GetFileSize("dest")); | 1294 EXPECT_EQ(0, GetFileSize("dest")); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 } // namespace content | 1297 } // namespace content |
| OLD | NEW |