summaryrefslogtreecommitdiffstats
path: root/base/file_util.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-09 17:42:26 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-09 17:42:26 +0000
commitf0ff2ad2c5bcf8e206baf27dbfaeef7743fd6c0d (patch)
treef16870d528455ef5acb84e180e6e07afb308ee6f /base/file_util.cc
parent456f3b4c2d9942fd86e7c374426d37f029542a9a (diff)
downloadchromium_src-f0ff2ad2c5bcf8e206baf27dbfaeef7743fd6c0d.zip
chromium_src-f0ff2ad2c5bcf8e206baf27dbfaeef7743fd6c0d.tar.gz
chromium_src-f0ff2ad2c5bcf8e206baf27dbfaeef7743fd6c0d.tar.bz2
Move Copy* into the base namespace.
This also creates a new base::internal namespace in file_util and I moved some of the internal functions in file_util to there. BUG= TBR=jam Review URL: https://codereview.chromium.org/18332014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.cc')
-rw-r--r--base/file_util.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index bf5ce23..4e1163a 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -47,7 +47,13 @@ int64 ComputeDirectorySize(const FilePath& root_path) {
bool Move(const FilePath& from_path, const FilePath& to_path) {
if (from_path.ReferencesParent() || to_path.ReferencesParent())
return false;
- return MoveUnsafe(from_path, to_path);
+ return internal::MoveUnsafe(from_path, to_path);
+}
+
+bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
+ if (from_path.ReferencesParent() || to_path.ReferencesParent())
+ return false;
+ return internal::CopyFileUnsafe(from_path, to_path);
}
} // namespace base
@@ -61,12 +67,6 @@ using base::FilePath;
using base::kExtensionSeparator;
using base::kMaxUniqueFiles;
-bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
- if (from_path.ReferencesParent() || to_path.ReferencesParent())
- return false;
- return CopyFileUnsafe(from_path, to_path);
-}
-
bool ContentsEqual(const FilePath& filename1, const FilePath& filename2) {
// We open the file in binary format even if they are text files because
// we are just comparing that bytes are exactly same in both files and not