| Index: chrome/browser/chromeos/boot_times_recorder.cc
|
| diff --git a/chrome/browser/chromeos/boot_times_recorder.cc b/chrome/browser/chromeos/boot_times_recorder.cc
|
| index ef8caf6ab157dcd17063940ecefd1b9732971e50..e61e2e3030a9f9ca5de1858aded1073c5ada95cb 100644
|
| --- a/chrome/browser/chromeos/boot_times_recorder.cc
|
| +++ b/chrome/browser/chromeos/boot_times_recorder.cc
|
| @@ -20,6 +20,7 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/stringprintf.h"
|
| +#include "base/sys_info.h"
|
| #include "base/thread_task_runner_handle.h"
|
| #include "base/threading/thread.h"
|
| #include "base/threading/thread_restrictions.h"
|
| @@ -80,6 +81,11 @@ const std::string GetTabUrl(RenderWidgetHost* rwh) {
|
| // written, or -1 on error.
|
| // TODO(satorux): Move this to file_util.
|
| int AppendFile(const base::FilePath& file_path, const char* data, int size) {
|
| + // Appending boot times to symlink in /tmp is a security risk for
|
| + // developers with chromeos=1 builds.
|
| + if (!base::SysInfo::IsRunningOnChromeOS() && base::IsLink(file_path))
|
| + return -1;
|
| +
|
| FILE* file = base::OpenFile(file_path, "a");
|
| if (!file)
|
| return -1;
|
|
|