diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 18:22:49 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 18:22:49 +0000 |
commit | 5628570f1bef7e3fd152bcff189fc13d3fbf5c9b (patch) | |
tree | 78d671a554a5a96290019e36f15baefe050e4732 /base/file_util_win.cc | |
parent | 1c6d40496ad8946c6cea837945e15bb663e8180b (diff) | |
download | chromium_src-5628570f1bef7e3fd152bcff189fc13d3fbf5c9b.zip chromium_src-5628570f1bef7e3fd152bcff189fc13d3fbf5c9b.tar.gz chromium_src-5628570f1bef7e3fd152bcff189fc13d3fbf5c9b.tar.bz2 |
Move GetFileSize, NormalizeFilePath to base namespace
BUG=
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/102873002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r-- | base/file_util_win.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index be58630..e655204 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -390,6 +390,18 @@ bool CreateDirectoryAndGetError(const FilePath& full_path, } } +bool NormalizeFilePath(const FilePath& path, FilePath* real_path) { + ThreadRestrictions::AssertIOAllowed(); + FilePath mapped_file; + if (!file_util::NormalizeToNativeFilePath(path, &mapped_file)) + return false; + // NormalizeToNativeFilePath() will return a path that starts with + // "\Device\Harddisk...". Helper DevicePathToDriveLetterPath() + // will find a drive letter which maps to the path's device, so + // that we return a path starting with a drive letter. + return file_util::DevicePathToDriveLetterPath(mapped_file, real_path); +} + } // namespace base // ----------------------------------------------------------------------------- @@ -547,18 +559,6 @@ bool SetCurrentDirectory(const FilePath& directory) { return ret != 0; } -bool NormalizeFilePath(const FilePath& path, FilePath* real_path) { - base::ThreadRestrictions::AssertIOAllowed(); - FilePath mapped_file; - if (!NormalizeToNativeFilePath(path, &mapped_file)) - return false; - // NormalizeToNativeFilePath() will return a path that starts with - // "\Device\Harddisk...". Helper DevicePathToDriveLetterPath() - // will find a drive letter which maps to the path's device, so - // that we return a path starting with a drive letter. - return DevicePathToDriveLetterPath(mapped_file, real_path); -} - bool DevicePathToDriveLetterPath(const FilePath& nt_device_path, FilePath* out_drive_letter_path) { base::ThreadRestrictions::AssertIOAllowed(); |