Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: base/linux_util.cc

Issue 8479002: Differentiate TOUCH_UI builds in crash reporting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid nested ifdef Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) 134 #if defined(OS_CHROMEOS) && defined(TOUCH_UI)
135 "CrOS Touch";
136 #elif defined(OS_CHROMEOS)
135 "CrOS"; 137 "CrOS";
136 #else // if defined(OS_LINUX) 138 #else // if defined(OS_LINUX)
137 "Unknown"; 139 "Unknown";
138 #endif 140 #endif
139 141
140 std::string GetLinuxDistro() { 142 std::string GetLinuxDistro() {
141 #if defined(OS_CHROMEOS) 143 #if defined(OS_CHROMEOS)
142 return g_linux_distro; 144 return g_linux_distro;
143 #elif defined(OS_LINUX) 145 #elif defined(OS_LINUX)
144 LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance(); 146 LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 298
297 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), 299 if (0 == strncmp(expected_data.c_str(), syscall_data.get(),
298 expected_data.length())) { 300 expected_data.length())) {
299 return current_tid; 301 return current_tid;
300 } 302 }
301 } 303 }
302 return -1; 304 return -1;
303 } 305 }
304 306
305 } // namespace base 307 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698