Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // For linux_syscall_support.h. This makes it safe to call embedded system | 5 // For linux_syscall_support.h. This makes it safe to call embedded system |
| 6 // calls when in seccomp mode. | 6 // calls when in seccomp mode. |
| 7 | 7 |
| 8 #include "components/crash/content/app/breakpad_linux.h" | 8 #include "components/crash/content/app/breakpad_linux.h" |
| 9 | 9 |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 | 205 |
| 206 // uint64_t version of my_uitos() from | 206 // uint64_t version of my_uitos() from |
| 207 // breakpad/src/common/linux/linux_libc_support.h. Convert a non-negative | 207 // breakpad/src/common/linux/linux_libc_support.h. Convert a non-negative |
| 208 // integer to a string (not null-terminated). | 208 // integer to a string (not null-terminated). |
| 209 void my_uint64tos(char* output, uint64_t i, unsigned i_len) { | 209 void my_uint64tos(char* output, uint64_t i, unsigned i_len) { |
| 210 for (unsigned index = i_len; index; --index, i /= 10) | 210 for (unsigned index = i_len; index; --index, i /= 10) |
| 211 output[index - 1] = '0' + (i % 10); | 211 output[index - 1] = '0' + (i % 10); |
| 212 } | 212 } |
| 213 | 213 |
| 214 #if !defined(OS_CHROMEOS) | 214 #if !defined(OS_CHROMEOS) |
| 215 bool my_isxdigit(char c) { | 215 bool my_isxdigit(char c) { |
|
brettw
2016/04/12 21:41:07
I think you can delete this and replace the only c
| |
| 216 return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); | 216 return base::IsAsciiDigit(c) || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); |
| 217 } | 217 } |
| 218 #endif | 218 #endif |
| 219 | 219 |
| 220 size_t LengthWithoutTrailingSpaces(const char* str, size_t len) { | 220 size_t LengthWithoutTrailingSpaces(const char* str, size_t len) { |
| 221 while (len > 0 && str[len - 1] == ' ') { | 221 while (len > 0 && str[len - 1] == ' ') { |
| 222 len--; | 222 len--; |
| 223 } | 223 } |
| 224 return len; | 224 return len; |
| 225 } | 225 } |
| 226 | 226 |
| (...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1920 const std::string& gpu_fingerprint) { | 1920 const std::string& gpu_fingerprint) { |
| 1921 g_microdump_info.Get().SetGpuFingerprint(gpu_fingerprint); | 1921 g_microdump_info.Get().SetGpuFingerprint(gpu_fingerprint); |
| 1922 } | 1922 } |
| 1923 #endif // OS_ANDROID | 1923 #endif // OS_ANDROID |
| 1924 | 1924 |
| 1925 bool IsCrashReporterEnabled() { | 1925 bool IsCrashReporterEnabled() { |
| 1926 return g_is_crash_reporter_enabled; | 1926 return g_is_crash_reporter_enabled; |
| 1927 } | 1927 } |
| 1928 | 1928 |
| 1929 } // namespace breakpad | 1929 } // namespace breakpad |
| OLD | NEW |