| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/process_util.h" | 5 #include "base/process_util.h" |
| 6 | 6 |
| 7 #include <dirent.h> | 7 #include <dirent.h> |
| 8 #include <malloc.h> | 8 #include <malloc.h> |
| 9 #include <sys/time.h> | 9 #include <sys/time.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| 11 #include <unistd.h> | 11 #include <unistd.h> |
| 12 | 12 |
| 13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/process/internal_linux.h" | 15 #include "base/process/internal_linux.h" |
| 16 #include "base/string_util.h" | |
| 17 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 18 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
| 18 #include "base/strings/string_util.h" |
| 19 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
| 20 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 | 23 |
| 24 #if defined(USE_LINUX_BREAKPAD) | 24 #if defined(USE_LINUX_BREAKPAD) |
| 25 size_t g_oom_size = 0U; | 25 size_t g_oom_size = 0U; |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 const char kProcSelfExe[] = "/proc/self/exe"; | 28 const char kProcSelfExe[] = "/proc/self/exe"; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 int score_len = static_cast<int>(score_str.length()); | 210 int score_len = static_cast<int>(score_str.length()); |
| 211 return (score_len == file_util::WriteFile(oom_file, | 211 return (score_len == file_util::WriteFile(oom_file, |
| 212 score_str.c_str(), | 212 score_str.c_str(), |
| 213 score_len)); | 213 score_len)); |
| 214 } | 214 } |
| 215 | 215 |
| 216 return false; | 216 return false; |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace base | 219 } // namespace base |
| OLD | NEW |