| Index: base/perftimer.cc
|
| ===================================================================
|
| --- base/perftimer.cc (revision 2711)
|
| +++ base/perftimer.cc (working copy)
|
| @@ -2,11 +2,13 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include <stdio.h>
|
| -
|
| #include "base/perftimer.h"
|
|
|
| +#include <stdio.h>
|
| +#include <string>
|
| +
|
| #include "base/basictypes.h"
|
| +#include "base/file_util.h"
|
| #include "base/logging.h"
|
|
|
| static FILE* perf_log_file = NULL;
|
| @@ -18,12 +20,8 @@
|
| return false;
|
| }
|
|
|
| -#if defined(OS_WIN)
|
| - return fopen_s(&perf_log_file, log_file, "w") == 0;
|
| -#elif defined(OS_POSIX)
|
| - perf_log_file = fopen(log_file, "w");
|
| + perf_log_file = file_util::OpenFile(std::string(log_file), "w");
|
| return perf_log_file != NULL;
|
| -#endif
|
| }
|
|
|
| void FinalizePerfLog() {
|
| @@ -32,7 +30,7 @@
|
| NOTREACHED();
|
| return;
|
| }
|
| - fclose(perf_log_file);
|
| + file_util::CloseFile(perf_log_file);
|
| }
|
|
|
| void LogPerfResult(const char* test_name, double value, const char* units) {
|
|
|