| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file contains utility functions for dealing with the local | 5 // This file contains utility functions for dealing with the local |
| 6 // filesystem. | 6 // filesystem. |
| 7 | 7 |
| 8 #ifndef BASE_FILE_UTIL_H_ | 8 #ifndef BASE_FILE_UTIL_H_ |
| 9 #define BASE_FILE_UTIL_H_ | 9 #define BASE_FILE_UTIL_H_ |
| 10 | 10 |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 | 591 |
| 592 return rc == ERROR_SUCCESS; | 592 return rc == ERROR_SUCCESS; |
| 593 #else | 593 #else |
| 594 NOTIMPLEMENTED(); | 594 NOTIMPLEMENTED(); |
| 595 return false; | 595 return false; |
| 596 #endif | 596 #endif |
| 597 } | 597 } |
| 598 | 598 |
| 599 #endif // UNIT_TEST | 599 #endif // UNIT_TEST |
| 600 | 600 |
| 601 #if defined(OS_WIN) |
| 602 // Loads the file passed in as an image section and touches pages to avoid |
| 603 // subsequent hard page faults during LoadLibrary. The size to be pre read |
| 604 // is passed in. If it is 0 then the whole file is paged in. The step size |
| 605 // which indicates the number of bytes to skip after every page touched is |
| 606 // also passed in. |
| 607 bool PreReadImage(const wchar_t* file_path, size_t size_to_read, |
| 608 size_t step_size); |
| 609 #endif // OS_WIN |
| 601 } // namespace file_util | 610 } // namespace file_util |
| 602 | 611 |
| 603 // Deprecated functions have been moved to this separate header file, | 612 // Deprecated functions have been moved to this separate header file, |
| 604 // which must be included last after all the above definitions. | 613 // which must be included last after all the above definitions. |
| 605 #include "base/file_util_deprecated.h" | 614 #include "base/file_util_deprecated.h" |
| 606 | 615 |
| 607 #endif // BASE_FILE_UTIL_H_ | 616 #endif // BASE_FILE_UTIL_H_ |
| OLD | NEW |