#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/i18n/file_util_icu.h"
#include <stdint.h>
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/i18n/string_compare.h"
#include "base/memory/singleton.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "third_party/icu/source/common/unicode/uniset.h"
#include "third_party/icu/source/i18n/unicode/coll.h"
namespace base {
namespace i18n {
namespace {
class IllegalCharacters { … };
IllegalCharacters::IllegalCharacters() { … }
UChar32 GetNextCodePoint(const FilePath::StringType* const file_name,
int& cursor) { … }
}
bool IsFilenameLegal(const std::u16string& file_name) { … }
void ReplaceIllegalCharactersInPath(FilePath::StringType* file_name,
char replace_char) { … }
bool LocaleAwareCompareFilenames(const FilePath& a, const FilePath& b) { … }
void NormalizeFileNameEncoding(FilePath* file_name) { … }
}
}