summaryrefslogtreecommitdiffstats
path: root/base/files
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-01 23:07:36 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-01 23:07:36 +0000
commit5553d5bcd8c1f0d90d74a2a52a4c9af51d730d01 (patch)
treef719fa0c440cb3492ccf9c9a2739afd5af5eace6 /base/files
parent10c1234fe5e6b43cd9f2f03f91da2c96083c7643 (diff)
downloadchromium_src-5553d5bcd8c1f0d90d74a2a52a4c9af51d730d01.zip
chromium_src-5553d5bcd8c1f0d90d74a2a52a4c9af51d730d01.tar.gz
chromium_src-5553d5bcd8c1f0d90d74a2a52a4c9af51d730d01.tar.bz2
Move DeleteAfterReboot, Move, and ReplaceFile to base namespace
Rename ReplaceFileAndGetError (only used once) to ReplaceFile (used 5 times) and have each of those callers specify NULL for the output error if they don't care. Remove InsertBeforeExtension from file_util.cc which seems to be unused. BUG= Review URL: https://codereview.chromium.org/18383003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/files')
-rw-r--r--base/files/file_path_watcher_browsertest.cc6
-rw-r--r--base/files/file_util_proxy_unittest.cc4
-rw-r--r--base/files/important_file_writer.cc2
3 files changed, 6 insertions, 6 deletions
diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc
index 2a8b0cf..a0b4319 100644
--- a/base/files/file_path_watcher_browsertest.cc
+++ b/base/files/file_path_watcher_browsertest.cc
@@ -261,7 +261,7 @@ TEST_F(FilePathWatcherTest, MovedFile) {
ASSERT_TRUE(SetupWatch(test_file(), &watcher, delegate.get(), false));
// Now make sure we get notified if the file is modified.
- ASSERT_TRUE(file_util::Move(source_file, test_file()));
+ ASSERT_TRUE(base::Move(source_file, test_file()));
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
}
@@ -496,7 +496,7 @@ TEST_F(FilePathWatcherTest, MoveParent) {
ASSERT_TRUE(WaitForEvents());
// Move the parent directory.
- file_util::Move(dir, dest);
+ base::Move(dir, dest);
VLOG(1) << "Waiting for directory move";
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(file_delegate.release());
@@ -588,7 +588,7 @@ TEST_F(FilePathWatcherTest, MoveChild) {
false));
// Move the directory into place, s.t. the watched file appears.
- ASSERT_TRUE(file_util::Move(source_dir, dest_dir));
+ ASSERT_TRUE(base::Move(source_dir, dest_dir));
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(file_delegate.release());
DeleteDelegateOnFileThread(subdir_delegate.release());
diff --git a/base/files/file_util_proxy_unittest.cc b/base/files/file_util_proxy_unittest.cc
index a4ba571..f524ba4 100644
--- a/base/files/file_util_proxy_unittest.cc
+++ b/base/files/file_util_proxy_unittest.cc
@@ -169,7 +169,7 @@ TEST_F(FileUtilProxyTest, Close) {
#if defined(OS_WIN)
// This fails on Windows if the file is not closed.
- EXPECT_FALSE(file_util::Move(test_path(),
+ EXPECT_FALSE(base::Move(test_path(),
test_dir_path().AppendASCII("new")));
#endif
@@ -181,7 +181,7 @@ TEST_F(FileUtilProxyTest, Close) {
EXPECT_EQ(PLATFORM_FILE_OK, error_);
// Now it should pass on all platforms.
- EXPECT_TRUE(file_util::Move(test_path(), test_dir_path().AppendASCII("new")));
+ EXPECT_TRUE(base::Move(test_path(), test_dir_path().AppendASCII("new")));
}
TEST_F(FileUtilProxyTest, CreateTemporary) {
diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc
index f10e7e6..b3564ef 100644
--- a/base/files/important_file_writer.cc
+++ b/base/files/important_file_writer.cc
@@ -84,7 +84,7 @@ bool ImportantFileWriter::WriteFileAtomically(const FilePath& path,
return false;
}
- if (!file_util::ReplaceFile(tmp_file_path, path)) {
+ if (!base::ReplaceFile(tmp_file_path, path, NULL)) {
LogFailure(path, FAILED_RENAMING, "could not rename temporary file");
base::Delete(tmp_file_path, false);
return false;