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

Side by Side Diff: base/linux_util.cc

Issue 10827322: Set linux distro to CHROMEOS_RELEASE_DESCRIPTION on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk and switch to const-ref string params in version loader callbacks Created 8 years, 4 months 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 | chrome/browser/chrome_browser_main_linux.h » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698