Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <glib.h> | 10 #include <glib.h> |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 } // namespace | 124 } // namespace |
| 125 | 125 |
| 126 namespace base { | 126 namespace base { |
| 127 | 127 |
| 128 // Account for the terminating null character. | 128 // Account for the terminating null character. |
| 129 static const int kDistroSize = 128 + 1; | 129 static const int kDistroSize = 128 + 1; |
| 130 | 130 |
| 131 // We use this static string to hold the Linux distro info. If we | 131 // We use this static string to hold the Linux distro info. If we |
| 132 // crash, the crash handler code will send this in the crash dump. | 132 // crash, the crash handler code will send this in the crash dump. |
| 133 char g_linux_distro[kDistroSize] = | 133 char g_linux_distro[kDistroSize] = |
| 134 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) | 134 #if defined(OS_CHROMEOS) |
| 135 "CrOS Touch"; | |
|
Nico
2011/11/22 22:25:34
So you no longer need separate crash report IDs?
Emmanuel Saint-loubert-Bié
2011/11/22 22:36:27
No we do not need different report for Touch. Howe
| |
| 136 #elif defined(OS_CHROMEOS) | |
| 137 "CrOS"; | 135 "CrOS"; |
| 138 #else // if defined(OS_LINUX) | 136 #else // if defined(OS_LINUX) |
| 139 "Unknown"; | 137 "Unknown"; |
| 140 #endif | 138 #endif |
| 141 | 139 |
| 142 std::string GetLinuxDistro() { | 140 std::string GetLinuxDistro() { |
| 143 #if defined(OS_CHROMEOS) | 141 #if defined(OS_CHROMEOS) |
| 144 return g_linux_distro; | 142 return g_linux_distro; |
| 145 #elif defined(OS_LINUX) | 143 #elif defined(OS_LINUX) |
| 146 LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance(); | 144 LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance(); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 | 296 |
| 299 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), | 297 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), |
| 300 expected_data.length())) { | 298 expected_data.length())) { |
| 301 return current_tid; | 299 return current_tid; |
| 302 } | 300 } |
| 303 } | 301 } |
| 304 return -1; | 302 return -1; |
| 305 } | 303 } |
| 306 | 304 |
| 307 } // namespace base | 305 } // namespace base |
| OLD | NEW |