Index: base/test/perf_test_suite.cc |
diff --git a/base/test/perf_test_suite.cc b/base/test/perf_test_suite.cc |
index 04ebb8b5d4eaa1c7889d49d191559b97c767580a..415aaef07e831621d31f0cc60a21be93b98e355d 100644 |
--- a/base/test/perf_test_suite.cc |
+++ b/base/test/perf_test_suite.cc |
@@ -24,9 +24,13 @@ void PerfTestSuite::Initialize() { |
FilePath log_path = |
CommandLine::ForCurrentProcess()->GetSwitchValuePath("log-file"); |
if (log_path.empty()) { |
- FilePath exe; |
- PathService::Get(FILE_EXE, &exe); |
- log_path = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); |
+ PathService::Get(FILE_EXE, &log_path); |
+#if defined(OS_ANDROID) |
+ base::FilePath tmp_dir; |
+ PathService::Get(base::DIR_CACHE, &tmp_dir); |
+ log_path = tmp_dir.Append(log_path.BaseName()); |
+#endif |
+ log_path = log_path.ReplaceExtension(FILE_PATH_LITERAL("log")); |
log_path = log_path.InsertBeforeExtension(FILE_PATH_LITERAL("_perf")); |
} |
ASSERT_TRUE(InitPerfLog(log_path)); |