summaryrefslogtreecommitdiffstats
path: root/base/file_util_win.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 17:35:24 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 17:35:24 +0000
commitf4c6499a37788cd2bc2c4781f005ad2c03fd47e7 (patch)
treeb39c30d15d470617ecbb695e7fc3b48791f4becc /base/file_util_win.cc
parent9a514902f55117eae04a60f917905e33e9914d32 (diff)
downloadchromium_src-f4c6499a37788cd2bc2c4781f005ad2c03fd47e7.zip
chromium_src-f4c6499a37788cd2bc2c4781f005ad2c03fd47e7.tar.gz
chromium_src-f4c6499a37788cd2bc2c4781f005ad2c03fd47e7.tar.bz2
Revert "Add file_util::ReplaceFile and use it in ImportantFileWriter."
http://crbug.com/11585 TBR=stoyan Review URL: http://codereview.chromium.org/113534 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r--base/file_util_win.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 77247a4..8964fbf 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -116,18 +116,6 @@ bool Move(const FilePath& from_path, const FilePath& to_path) {
return false;
}
-bool ReplaceFile(const FilePath& from_path, const FilePath& to_path) {
- // Make sure that the target file exists.
- HANDLE target_file = ::CreateFile(to_path.value().c_str(), 0,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, CREATE_NEW,
- FILE_ATTRIBUTE_NORMAL, NULL);
- if (target_file != INVALID_HANDLE_VALUE)
- ::CloseHandle(target_file);
- return ::ReplaceFile(to_path.value().c_str(), from_path.value().c_str(),
- NULL, 0, NULL, NULL) ? true : false;
-}
-
bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
// NOTE: I suspect we could support longer paths, but that would involve
// analyzing all our usage of files.