Index: base/file_util.h |
diff --git a/base/file_util.h b/base/file_util.h |
index 4ffd05babda8018f625cbf237d2101a058604bae..034d67c564f841e417b67476e1aa2a36cfe317ac 100644 |
--- a/base/file_util.h |
+++ b/base/file_util.h |
@@ -101,7 +101,13 @@ BASE_EXPORT bool MoveUnsafe(const base::FilePath& from_path, |
// volume, or the function will fail. Destination file will be created |
// if it doesn't exist. Prefer this function over Move when dealing with |
// temporary files. On Windows it preserves attributes of the target file. |
-// Returns true on success. |
+// Returns true on success, leaving *error unchanged. |
+// Returns false on failure and sets *error appropriately, if it is non-NULL. |
+BASE_EXPORT bool ReplaceFileAndGetError(const base::FilePath& from_path, |
+ const base::FilePath& to_path, |
+ base::PlatformFileError* error); |
+ |
+// Backward-compatible convenience method for the above. |
BASE_EXPORT bool ReplaceFile(const base::FilePath& from_path, |
const base::FilePath& to_path); |