Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: base/test/test_file_util.h

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/scoped_path_override.h ('k') | base/value_conversions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_file_util.h
diff --git a/base/test/test_file_util.h b/base/test/test_file_util.h
index 165af7092a1209309fddd50b035b76c00a51ea81..e97c0e55a0310c86fffca6b477adbf360153ae17 100644
--- a/base/test/test_file_util.h
+++ b/base/test/test_file_util.h
@@ -12,18 +12,20 @@
#include "base/compiler_specific.h"
#include "base/file_path.h"
+namespace base {
class FilePath;
+}
namespace file_util {
// Wrapper over file_util::Delete. On Windows repeatedly invokes Delete in case
// of failure to workaround Windows file locking semantics. Returns true on
// success.
-bool DieFileDie(const FilePath& file, bool recurse);
+bool DieFileDie(const base::FilePath& file, bool recurse);
// Clear a specific file from the system cache. After this call, trying
// to access this file will result in a cold load from the hard drive.
-bool EvictFileFromSystemCache(const FilePath& file);
+bool EvictFileFromSystemCache(const base::FilePath& file);
// Like CopyFileNoCache but recursively copies all files and subdirectories
// in the given input directory to the output directory. Any files in the
@@ -31,39 +33,39 @@ bool EvictFileFromSystemCache(const FilePath& file);
//
// Returns true on success. False means there was some error copying, so the
// state of the destination is unknown.
-bool CopyRecursiveDirNoCache(const FilePath& source_dir,
- const FilePath& dest_dir);
+bool CopyRecursiveDirNoCache(const base::FilePath& source_dir,
+ const base::FilePath& dest_dir);
#if defined(OS_WIN)
// Returns true if the volume supports Alternate Data Streams.
-bool VolumeSupportsADS(const FilePath& path);
+bool VolumeSupportsADS(const base::FilePath& path);
// Returns true if the ZoneIdentifier is correctly set to "Internet" (3).
// Note that this function must be called from the same process as
// the one that set the zone identifier. I.e. don't use it in UI/automation
// based tests.
-bool HasInternetZoneIdentifier(const FilePath& full_path);
+bool HasInternetZoneIdentifier(const base::FilePath& full_path);
#endif // defined(OS_WIN)
// In general it's not reliable to convert a FilePath to a wstring and we use
// string16 elsewhere for Unicode strings, but in tests it is frequently
// convenient to be able to compare paths to literals like L"foobar".
-std::wstring FilePathAsWString(const FilePath& path);
-FilePath WStringAsFilePath(const std::wstring& path);
+std::wstring FilePathAsWString(const base::FilePath& path);
+base::FilePath WStringAsFilePath(const std::wstring& path);
// For testing, make the file unreadable or unwritable.
// In POSIX, this does not apply to the root user.
-bool MakeFileUnreadable(const FilePath& path) WARN_UNUSED_RESULT;
-bool MakeFileUnwritable(const FilePath& path) WARN_UNUSED_RESULT;
+bool MakeFileUnreadable(const base::FilePath& path) WARN_UNUSED_RESULT;
+bool MakeFileUnwritable(const base::FilePath& path) WARN_UNUSED_RESULT;
// Saves the current permissions for a path, and restores it on destruction.
class PermissionRestorer {
public:
- explicit PermissionRestorer(const FilePath& path);
+ explicit PermissionRestorer(const base::FilePath& path);
~PermissionRestorer();
private:
- const FilePath path_;
+ const base::FilePath path_;
void* info_; // The opaque stored permission information.
size_t length_; // The length of the stored permission information.
« no previous file with comments | « base/test/scoped_path_override.h ('k') | base/value_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698