diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 17:38:30 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 17:38:30 +0000 |
commit | d0767cb54b2b5ee4d9cf00b3ee0fa585826b4036 (patch) | |
tree | 1c2ee733bf62a44c31dc11f76dad53243a84439f /base/file_util.h | |
parent | e91d532339c854ff0a082c6562a519647524fa66 (diff) | |
download | chromium_src-d0767cb54b2b5ee4d9cf00b3ee0fa585826b4036.zip chromium_src-d0767cb54b2b5ee4d9cf00b3ee0fa585826b4036.tar.gz chromium_src-d0767cb54b2b5ee4d9cf00b3ee0fa585826b4036.tar.bz2 |
Separate out some more ICU from base and into base/i18n.
This moves string_util_icu. I moved the number formatting function into
base/i18n/number_formatting and just removed the other function in
string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places
and isn't actually helpful (and the fact that it round-trips through UTF-16 is
better for the caller to see).
This takes out the sorting from the FileEnumerator. The comment says the
sorting is not guaranteed. I moved it into file_util_icu as a standalone
function for callers of FileEnumerator to call manually if they need sorted
results. I modified the directory lister to use this sorting instead, and filed
a bug on doing more optimal JS-based sorting.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/267001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r-- | base/file_util.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/base/file_util.h b/base/file_util.h index 6474f048..37634b9 100644 --- a/base/file_util.h +++ b/base/file_util.h @@ -103,19 +103,6 @@ void InsertBeforeExtension(FilePath* path, const FilePath::StringType& suffix); void ReplaceExtension(FilePath* file_name, const FilePath::StringType& extension); -// Replaces characters in 'file_name' that are illegal for file names with -// 'replace_char'. 'file_name' must not be a full or relative path, but just the -// file name component. Any leading or trailing whitespace in 'file_name' is -// removed. -// Example: -// file_name == "bad:file*name?.txt", changed to: "bad-file-name-.txt" when -// 'replace_char' is '-'. -void ReplaceIllegalCharacters(std::wstring* file_name, int replace_char); - -// Returns true if file_name does not have any illegal character. The input -// param has the same restriction as that for ReplaceIllegalCharacters. -bool IsFilenameLegal(const string16& file_name); - //----------------------------------------------------------------------------- // Functions that involve filesystem access or modification: @@ -490,10 +477,6 @@ class FileEnumerator { static bool ReadDirectory(std::vector<DirectoryEntryInfo>* entries, const FilePath& source, bool show_links); - // Comparison function to neatly sort directory entries - static bool CompareFiles(const DirectoryEntryInfo& a, - const DirectoryEntryInfo& b); - // The files in the current directory std::vector<DirectoryEntryInfo> directory_entries_; @@ -501,7 +484,7 @@ class FileEnumerator { size_t current_directory_entry_; #endif - DISALLOW_EVIL_CONSTRUCTORS(FileEnumerator); + DISALLOW_COPY_AND_ASSIGN(FileEnumerator); }; class MemoryMappedFile { |