| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 namespace fileapi { | 37 namespace fileapi { |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 bool FileExists(const base::FilePath& path) { | 41 bool FileExists(const base::FilePath& path) { |
| 42 return base::PathExists(path) && !base::DirectoryExists(path); | 42 return base::PathExists(path) && !base::DirectoryExists(path); |
| 43 } | 43 } |
| 44 | 44 |
| 45 int64 GetSize(const base::FilePath& path) { | 45 int64 GetSize(const base::FilePath& path) { |
| 46 int64 size; | 46 int64 size; |
| 47 EXPECT_TRUE(file_util::GetFileSize(path, &size)); | 47 EXPECT_TRUE(base::GetFileSize(path, &size)); |
| 48 return size; | 48 return size; |
| 49 } | 49 } |
| 50 | 50 |
| 51 // After a move, the dest exists and the source doesn't. | 51 // After a move, the dest exists and the source doesn't. |
| 52 // After a copy, both source and dest exist. | 52 // After a copy, both source and dest exist. |
| 53 struct CopyMoveTestCaseRecord { | 53 struct CopyMoveTestCaseRecord { |
| 54 bool is_copy_not_move; | 54 bool is_copy_not_move; |
| 55 const char source_path[64]; | 55 const char source_path[64]; |
| 56 const char dest_path[64]; | 56 const char dest_path[64]; |
| 57 bool cause_overwrite; | 57 bool cause_overwrite; |
| (...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2481 false /* exclusive */, | 2481 false /* exclusive */, |
| 2482 true /* recursive */)); | 2482 true /* recursive */)); |
| 2483 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY, | 2483 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY, |
| 2484 ofu()->CreateDirectory(UnlimitedContext().get(), | 2484 ofu()->CreateDirectory(UnlimitedContext().get(), |
| 2485 path_in_file_in_file, | 2485 path_in_file_in_file, |
| 2486 false /* exclusive */, | 2486 false /* exclusive */, |
| 2487 true /* recursive */)); | 2487 true /* recursive */)); |
| 2488 } | 2488 } |
| 2489 | 2489 |
| 2490 } // namespace fileapi | 2490 } // namespace fileapi |
| OLD | NEW |