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

Unified Diff: base/file_util.h

Issue 14886003: Make base:ReplaceFile return an informative error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change comment Created 7 years, 7 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 | « no previous file | base/file_util_posix.cc » ('j') | base/file_util_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 4ffd05babda8018f625cbf237d2101a058604bae..052bb85e3cb15611da1e5ae279c4b5c1a3529e98 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -101,9 +101,11 @@ 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 and optionally sets *error to base::PLATFORM_FILE_OK.
jar (doing other things) 2013/05/07 01:12:36 nit: I think you should avoid specing things as "o
dgrogan 2013/05/07 19:02:05 That sounds fine. But it will require changing all
jar (doing other things) 2013/05/07 19:44:50 Default args would indeed be less disruptive... bu
+// Returns false on failure and optionally sets *error appropriately.
BASE_EXPORT bool ReplaceFile(const base::FilePath& from_path,
- const base::FilePath& to_path);
+ const base::FilePath& to_path,
+ base::PlatformFileError* error = NULL);
jar (doing other things) 2013/05/07 01:12:36 nit: default arguments are not allowed according t
// Copies a single file. Use CopyDirectory to copy directories.
// This function fails if either path contains traversal components ('..').
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | base/file_util_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698