summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 22:17:06 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 22:17:06 +0000
commitd70539de3df8f214397881727229a7786da9be35 (patch)
treed10df8d461702c8de9b6df045955ee2226edc046 /base/file_util.h
parent16792a730c621ed32aa53b57d57e6c88e232ea02 (diff)
downloadchromium_src-d70539de3df8f214397881727229a7786da9be35.zip
chromium_src-d70539de3df8f214397881727229a7786da9be35.tar.gz
chromium_src-d70539de3df8f214397881727229a7786da9be35.tar.bz2
Replace std:;wstring with std::string and string16 in locale-name related APIs.
1. Change the locale param to be std::string because they're always ASCII and change call-sites accordingly. 2. Add GetStringFUTF16 to l10n_util. On Windows, they're inline helpers calling the correspondingGetStringF returning wstring while on Mac/Linux, they just return the result of |string16 GetStringF|without converting to wstring. This is part 1 of the fix for issue 8647. Some of newly introduced conversions are temporary and will be removed later (e.g. ASCIIToWide applied to the result of GetApplicationLocale in a few places). Note : this CL will be landed after http://codereview.chromium.org/147038 is landed. BUG=8647 (http://crbug.com/8647) TEST=Pass l10n_util_unittest and other unit tests Review URL: http://codereview.chromium.org/126223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19183 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/file_util.h b/base/file_util.h
index 30918d3..63bbf1f 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -26,8 +26,9 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/scoped_ptr.h"
#include "base/file_path.h"
+#include "base/scoped_ptr.h"
+#include "base/string16.h"
namespace base {
class Time;
@@ -113,6 +114,10 @@ void ReplaceExtension(FilePath* file_name,
// '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: