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

Unified Diff: chrome/tools/convert_dict/convert_dict.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/convert_dict.cc
===================================================================
--- chrome/tools/convert_dict/convert_dict.cc (revision 2711)
+++ chrome/tools/convert_dict/convert_dict.cc (working copy)
@@ -13,6 +13,7 @@
#include <stdio.h>
+#include "base/file_util.h"
#include "base/icu_util.h"
#include "base/process_util.h"
#include "base/string_util.h"
@@ -113,14 +114,13 @@
std::string out_name = file_base + ".bdic";
printf("Writing %s ...\n", out_name.c_str());
- FILE* out_file;
- fopen_s(&out_file, out_name.c_str(), "wb");
+ FILE* out_file = file_util::OpenFile(out_name, "wb");
if (!out_file) {
printf("ERROR writing file\n");
return 1;
}
fwrite(&serialized[0], 1, serialized.size(), out_file);
- fclose(out_file);
+ file_util::CloseFile(out_file);
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698