diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 17:40:13 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 17:40:13 +0000 |
commit | 836f134c56bfa714217ca12a73482205c1480774 (patch) | |
tree | 5c5b9d938a712e09831bdd32022e1b3716c5fbdf /chrome/browser/spellchecker.cc | |
parent | d46d6f3b80099ce0c630185a2e86b649bba49254 (diff) | |
download | chromium_src-836f134c56bfa714217ca12a73482205c1480774.zip chromium_src-836f134c56bfa714217ca12a73482205c1480774.tar.gz chromium_src-836f134c56bfa714217ca12a73482205c1480774.tar.bz2 |
Cross-platform wrappers for fopen, _wfopen_s, etc.
Patch by Paweł Hajdan jr <phajdan.jr@gmail.com>.
http://codereview.chromium.org/6005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker.cc')
-rw-r--r-- | chrome/browser/spellchecker.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/spellchecker.cc b/chrome/browser/spellchecker.cc index 43df962..186791a 100644 --- a/chrome/browser/spellchecker.cc +++ b/chrome/browser/spellchecker.cc @@ -471,10 +471,9 @@ class AddWordToCustomDictionaryTask : public Task { // faster, compared to verifying everytime whether to append a new line // or not. word_ += "\n"; - const char* file_name_char = file_name_.c_str(); - FILE* f = fopen(file_name_char, "a+"); + FILE* f = file_util::OpenFile(file_name_, "a+"); fputs(word_.c_str(), f); - fclose(f); + file_util::CloseFile(f); } std::string file_name_; |