Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: chrome/tools/convert_dict/aff_reader.cc

Issue 6005: Cross-platform equivalent of fopen, _wfopen_s etc.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/tools/convert_dict/aff_reader.cc
===================================================================
--- chrome/tools/convert_dict/aff_reader.cc (revision 2711)
+++ chrome/tools/convert_dict/aff_reader.cc (working copy)
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/file_util.h"
#include "base/string_util.h"
#include "chrome/tools/convert_dict/hunspell_reader.h"
@@ -44,7 +45,7 @@
} // namespace
AffReader::AffReader(const std::string& filename) {
- fopen_s(&file_, filename.c_str(), "r");
+ file_ = file_util::OpenFile(filename, "r");
// Default to Latin1 in case the file doesn't specify it.
encoding_ = "ISO8859-1";
@@ -52,7 +53,7 @@
AffReader::~AffReader() {
if (file_)
- fclose(file_);
+ file_util::CloseFile(file_);
}
bool AffReader::Read() {

Powered by Google App Engine
This is Rietveld 408576698