summaryrefslogtreecommitdiffstats
path: root/chrome/tools/convert_dict
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:49:05 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:49:05 +0000
commit63597e4ebc117bb561b93f4d775d787120e6728a (patch)
treea4825625ef2ff06b339e56a30fa5ae80aea29160 /chrome/tools/convert_dict
parentc48abb01ae7e295e283f190bd05270e835b8d37f (diff)
downloadchromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.zip
chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.gz
chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.bz2
Deprecate most of the remaining wstring file_util functions.
These still exist on Windows due to being used by the installer, but by moving them into the Windows-only block we prevent them from being used in new code. (I am already finding new code using some of these! I am glad to be rid of them.) BUG=24672 Review URL: http://codereview.chromium.org/2850042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/convert_dict')
-rw-r--r--chrome/tools/convert_dict/aff_reader.cc3
-rw-r--r--chrome/tools/convert_dict/dic_reader.cc6
2 files changed, 6 insertions, 3 deletions
diff --git a/chrome/tools/convert_dict/aff_reader.cc b/chrome/tools/convert_dict/aff_reader.cc
index ea7e2a8..767ba92 100644
--- a/chrome/tools/convert_dict/aff_reader.cc
+++ b/chrome/tools/convert_dict/aff_reader.cc
@@ -48,7 +48,8 @@ void CollapseDuplicateSpaces(std::string* str) {
AffReader::AffReader(const std::string& filename)
: has_indexed_affixes_(false) {
- file_ = file_util::OpenFile(filename, "r");
+ FilePath path = FilePath::FromWStringHack(ASCIIToWide(filename));
+ file_ = file_util::OpenFile(path, "r");
// Default to Latin1 in case the file doesn't specify it.
encoding_ = "ISO8859-1";
diff --git a/chrome/tools/convert_dict/dic_reader.cc b/chrome/tools/convert_dict/dic_reader.cc
index 2233d04..bac3162 100644
--- a/chrome/tools/convert_dict/dic_reader.cc
+++ b/chrome/tools/convert_dict/dic_reader.cc
@@ -129,8 +129,10 @@ bool PopulateWordSet(WordSet* word_set, FILE* file, AffReader* aff_reader,
} // namespace
DicReader::DicReader(const std::string& filename) {
- file_ = file_util::OpenFile(filename, "r");
- additional_words_file_ = file_util::OpenFile(filename + "_delta", "r");
+ FilePath path = FilePath::FromWStringHack(ASCIIToWide(filename));
+ file_ = file_util::OpenFile(path, "r");
+ additional_words_file_ =
+ file_util::OpenFile(FilePath(path.InsertBeforeExtension("_delta")), "r");
}
DicReader::~DicReader() {