| 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/linux_util.h" | 5 #include "base/linux_util.h" |
| 6 | 6 |
| 7 #include <dirent.h> | 7 #include <dirent.h> |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <stdlib.h> | 10 #include <stdlib.h> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 namespace base { | 125 namespace base { |
| 126 | 126 |
| 127 const char kFindInodeSwitch[] = "--find-inode"; | 127 const char kFindInodeSwitch[] = "--find-inode"; |
| 128 | 128 |
| 129 // Account for the terminating null character. | 129 // Account for the terminating null character. |
| 130 static const int kDistroSize = 128 + 1; | 130 static const int kDistroSize = 128 + 1; |
| 131 | 131 |
| 132 // We use this static string to hold the Linux distro info. If we | 132 // We use this static string to hold the Linux distro info. If we |
| 133 // crash, the crash handler code will send this in the crash dump. | 133 // crash, the crash handler code will send this in the crash dump. |
| 134 char g_linux_distro[kDistroSize] = | 134 char g_linux_distro[kDistroSize] = |
| 135 #if defined(OS_CHROMEOS) && defined(USE_AURA) | 135 #if defined(OS_CHROMEOS) |
| 136 "CrOS Aura"; | |
| 137 #elif defined(OS_CHROMEOS) | |
| 138 "CrOS"; | 136 "CrOS"; |
| 139 #elif defined(OS_ANDROID) | 137 #elif defined(OS_ANDROID) |
| 140 "Android"; | 138 "Android"; |
| 141 #else // if defined(OS_LINUX) | 139 #else // if defined(OS_LINUX) |
| 142 "Unknown"; | 140 "Unknown"; |
| 143 #endif | 141 #endif |
| 144 | 142 |
| 145 std::string GetLinuxDistro() { | 143 std::string GetLinuxDistro() { |
| 146 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 144 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 147 return g_linux_distro; | 145 return g_linux_distro; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 295 |
| 298 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), | 296 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), |
| 299 expected_data.length())) { | 297 expected_data.length())) { |
| 300 return current_tid; | 298 return current_tid; |
| 301 } | 299 } |
| 302 } | 300 } |
| 303 return -1; | 301 return -1; |
| 304 } | 302 } |
| 305 | 303 |
| 306 } // namespace base | 304 } // namespace base |
| OLD | NEW |