summaryrefslogtreecommitdiffstats
path: root/base/linux_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolete usage of TOUCH_UI.saintlou@chromium.org2011-11-231-2/+2
| | | | | | | | | | BUG=105046 TEST=none Review URL: http://codereview.chromium.org/8660001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111287 0039d316-1c4b-4281-b951-d872f2087c98
* Differentiate TOUCH_UI builds in crash reporting.rbyers@chromium.org2011-11-101-1/+3
| | | | | | | | | | | | | | | In TOUCH_UI ChromeOS builds, augment the Linux distro so that crash reports will have lsb-release="CrOS Touch" instead of just "CrOS". This mirrors the change in User-Agent in TOUCH_UI builds as well (see BuildOSCpuInfo() in webkit/glue/user_agent.cc). BUG=chromium-os:22255 TEST=Manual Review URL: http://codereview.chromium.org/8479002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109436 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the remaining exit time destructors from base for linux and chromeos.thakis@chromium.org2011-11-091-3/+3
| | | | | | | | | BUG=101600 TEST=none Review URL: http://codereview.chromium.org/8507022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109309 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-261-7/+7
| | | | | | | | | | | [ Reland of 107042 http://codereview.chromium.org/8368009 ] I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8341026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107434 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107042 - Replace most LOG/CHECK statements with DLOG/DCHECK ↵brettw@chromium.org2011-10-251-7/+7
| | | | | | | | | | | | | | statements in base. I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/8351025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107051 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-251-7/+7
| | | | | | | | | I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107042 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD patches for base and build, part 2robert.nagy@gmail.com2011-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | base/base.gyp: - exclude test/test_file_util_linux.cc on OpenBSD because of missing fdatasync() base/base.gypi: - include linux_util.cc on OpenBSD too - exclude some linux specific files from the OpenBSD build because the openbsd implementation is different base/file_util_posix.cc: - Use file_util::GetTempDir directly to get the shm dir on !linux base/sys_info_freebsd.cc: - return 0 and do a NOTREACHED() in case sysctlbyname() fails base/sys_info_openbsd.cc: - cleanup includes - use arraysize() in the sysctl() call - implement SysInfo::MaxSharedMemorySize() build/common.gypi: - -Wno-deprecated is C++ only flag so move it to cflags_cc - Do not exclude linux specific files, dirs on OpenBSD since 90% of it is sharable base/sys_info_linux.cc: - DCHECK if the read string is empty - Use base::StringToInt64() to convert the string to an int64 - DCHECK if the returned int64 is okay for a size_t - call NOTREACHED() and return 0 if fails BUG= TEST=runs on linux? Review URL: http://codereview.chromium.org/8382001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106984 0039d316-1c4b-4281-b951-d872f2087c98
* Always search TIDs for the crashing processes.kmixter@chromium.org2011-06-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Kernels newer than 2.6.32 support TID and PID namespacing where processes' view of their TIDs and PIDs are not globally unique or externally meaningful. We have workarounds to find the TID and PID of the crashing process from outside in the browser process. However, we were only assuming TID namespacing was happening if PID namespacing was enabled and the kernel had a bug that was fixed since 2.6.38. This change causes us to always treat the TID as subject to namespacing. Our trick to find the TID relies on a procfs feature added in 2008. We assume if that feature is not yet present that the TID translation is not necessary. This fixes the bug where all crashes of non-browser processes on Linux 2.6.38+ (Chrome OS r13+) are unusable (result in UnspecifiedStackSignature). BUG=chromium-os:15462 TEST=Do about:crash on 2.6.38 kernel and verify proper tid listed in MDException block Review URL: http://codereview.chromium.org/7190019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89795 0039d316-1c4b-4281-b951-d872f2087c98
* Replacing outdated DCHECK(a == b) with DCHECK_EQ(a, b).david.mike.futcher@gmail.com2011-04-181-1/+1
| | | | | | | | | | | | | This is my first attempt at contributing, so please tell me where I'm going wrong. BUG=58409 TEST= Review URL: http://codereview.chromium.org/6851016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81988 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-211-4/+4
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
* Rename all methods accessing Singleton<T> as GetInstance().satish@chromium.org2010-12-131-2/+2
| | | | | | | | | | | | | | | This is in preparation to a subsequent CL where Singleton<T> will restrict access to only the type being made singleton. This primarily covers files in chrome os and other directories, missed in the previous CL. In a couple of files i changed Singleton<T> usage to LazyInstance<T>, because changing the method name to GetInstance() in there would require a whole lot of updates throughout the chrome os codebase. BUG=65298 TEST=all existing tests should pass. Review URL: http://codereview.chromium.org/5734002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69007 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup some duplicated includes.tfarina@chromium.org2010-09-041-1/+0
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3358014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58582 0039d316-1c4b-4281-b951-d872f2087c98
* Make crash reporting client_id accessible through child_process_logging.mnissler@chromium.org2010-08-261-6/+14
| | | | | | | | | | | | | | | | | | On Mac and Linux, keep the client id in a global variable kept by the child_process_logging implementations. This allows to read it in a thread safe fashion when starting a child process. Also replace std::string with statically allocated buffers for the various items we add to the crash reports. This allows to properly handle crashes upon shutdown (std::string would run its destructor, invalidating the memory). BUG=53231 TEST=Crash reporting should still work Review URL: http://codereview.chromium.org/3186028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57497 0039d316-1c4b-4281-b951-d872f2087c98
* base: Rename EnvVarGetter to Environment.tfarina@chromium.org2010-08-031-1/+0
| | | | | | | | | | | | | | | Now EnvVarGetter do much more than getting environment variables. Per suggestion from Pawel in http://codereview.chromium.org/3043018/. BUG=None TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/3052034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54696 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Guess the thread id for crashing renderers in a different PID namespace.thestig@chromium.org2010-07-161-0/+47
| | | | | | | | BUG=48997 TEST=Google Chrome gets valid crash reports for about:crash most of the time. Review URL: http://codereview.chromium.org/2961008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52723 0039d316-1c4b-4281-b951-d872f2087c98
* Move non-linux specific code from base/linux_util to app/gtk_utilpvalchev@google.com2010-05-131-20/+0
| | | | | | | | from sprewell Review URL: http://codereview.chromium.org/2058004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47201 0039d316-1c4b-4281-b951-d872f2087c98
* bsd: refactor XDG bits of linux_util into a shared file.evan@chromium.org2010-04-221-87/+0
| | | | | | | | | This allows the shared code to build on the BSDs without them needing to build _linux files. Review URL: http://codereview.chromium.org/1701005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45380 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Improve xfce detection.erg@chromium.org2010-04-151-5/+5
| | | | | | | | | | | | On Hardy, the DESKTOP_SESSION environment variable is "xfce4" but on Karmic, it is "xfce" BUG=none TEST=none Review URL: http://codereview.chromium.org/1572042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44698 0039d316-1c4b-4281-b951-d872f2087c98
* Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h and ↵thestig@chromium.org2010-04-031-53/+17
| | | | | | | | | | rename it EnvVarGetter. Label base::SysInfo::{Get,Has}EnvVar as deprecated. BUG=none TEST=none Review URL: http://codereview.chromium.org/1606007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43559 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Turn on the GTK+ integration by default.erg@chromium.org2010-03-261-0/+4
| | | | | | | | | | | | | | This will regress default startup time for users by 50ms. This doesn't matter because this is what the users want--I've lost count of the number bloggers, people on twitter, and people in our IRC channel complaining about the lack of GTK+ integration...when it's just not on by default. BUG=none TEST=none Review URL: http://codereview.chromium.org/1442001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42804 0039d316-1c4b-4281-b951-d872f2087c98
* BSD port changes for base/ (OS_POSIX/GTK instead of OS_LINUXpvalchev@google.com2010-03-101-1/+3
| | | | | | | | where applicable, missing includes, etc) Review URL: http://codereview.chromium.org/774001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41143 0039d316-1c4b-4281-b951-d872f2087c98
* Move some XDG code from chrome to base, make DIR_USER_CACHE generic rather ↵thestig@chromium.org2009-12-021-1/+39
| | | | | | | | | | than Chromium specific, and clean up a few headers. BUG=none TEST=none Review URL: http://codereview.chromium.org/449048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33565 0039d316-1c4b-4281-b951-d872f2087c98
* Properly detect KDE4 on newer systems (e.g. [K]Ubuntu 9.04).mdm@chromium.org2009-11-251-1/+6
| | | | | | | | BUG=25938 TEST=try to configure proxy settings on KDE4 when $DESKTOP_SESSION=kde, it should work Review URL: http://codereview.chromium.org/427013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33132 0039d316-1c4b-4281-b951-d872f2087c98
* Move FileDescriptorGetInode() and FindProcessHoldingSocket() into ↵thestig@chromium.org2009-10-291-0/+126
| | | | | | | | | | base/linux_util.cc. Reimplement FileDescriptorGetInode(). BUG=none TEST=none Review URL: http://codereview.chromium.org/312002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30433 0039d316-1c4b-4281-b951-d872f2087c98
* Trim the lsb_release output in GetLinuxDistro.thestig@chromium.org2009-10-211-1/+3
| | | | | | | | BUG=none TEST=With crash reporting enabled, renderer process command line doesn't have a trailing '?' in the --enable-crash-reporter switch value. Review URL: http://codereview.chromium.org/307027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29718 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify GetLinuxDistro() for Chrome OS.thestig@chromium.org2009-10-211-5/+13
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/303018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29682 0039d316-1c4b-4281-b951-d872f2087c98
* On Linux, Chrome uses lsb_release (a python script) to determine the name of ↵cmasone@google.com2009-10-191-0/+4
| | | | | | | | the distro. On Chrome OS, we don't need to do this. Review URL: http://codereview.chromium.org/285013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29405 0039d316-1c4b-4281-b951-d872f2087c98
* Make GetLinuxDistro thread-safe.thestig@chromium.org2009-10-131-8/+61
| | | | | | | | BUG=24659 TEST=none Review URL: http://codereview.chromium.org/273026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28785 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: make the "change proxy settings" button able to start several proxy ↵mdm@chromium.org2009-08-201-3/+25
| | | | | | | | | | | | config utilities. Currently it still only ever starts gnome-network-properties but it is now easy to update. BUG=none TEST=none Review URL: http://codereview.chromium.org/174106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23910 0039d316-1c4b-4281-b951-d872f2087c98
* linux: generalize desktop environment guessing to encompass KDEevan@chromium.org2009-07-231-8/+19
| | | | | | | | BUG=17363 Review URL: http://codereview.chromium.org/159297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21455 0039d316-1c4b-4281-b951-d872f2087c98
* Try again: Add proxy config (using gnome-network-preferences)mattm@chromium.org2009-07-221-0/+50
| | | | | | | | | BUG=11507 TEST=Open options, click change proxy, gnome-network-preferences should launch.  If gnome isn't installed or running, LinuxProxyConfig wiki page should load. Review URL: http://codereview.chromium.org/155792 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21246 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add proxy config (using gnome-network-preferences)"mattm@chromium.org2009-07-181-10/+0
| | | | | | | | This reverts commit d06bc0c855b1e81e36c7bfc9bef342eb358d99a5. TBR=estade git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21033 0039d316-1c4b-4281-b951-d872f2087c98
* Add proxy config (using gnome-network-preferences)mattm@chromium.org2009-07-171-0/+10
| | | | | | | | | BUG=11507 TEST=Open options, click change proxy, gnome-network-preferences should launch. If gnome isn't installed, LinuxProxyConfig wiki page should load. Review URL: http://codereview.chromium.org/149785 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21023 0039d316-1c4b-4281-b951-d872f2087c98
* Include output of "lsb_release -d" in crash reports.thestig@chromium.org2009-07-171-1/+32
| | | | | | | | | /etc/lsb-release does not exist on all distros, and sometimes it does not provide any useful info. Whereas all LSB complaint distros return useful data with the lsb_release command. Review URL: http://codereview.chromium.org/155653 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20936 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate a circular dependency by making BGRAToRGBA() generic (no pulling ↵sgk@google.com2009-04-211-0/+31
in guchar from gtk.h) and moving it from base/gfx to base. Review URL: http://codereview.chromium.org/87016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14117 0039d316-1c4b-4281-b951-d872f2087c98