0
Commit Graph

37 Commits

Author SHA1 Message Date
jhawkins@chromium.org
da9ccfb9ad Cleanup: Remove static storage for variables in an unnamed namespace.
BUG=none
TEST=none
R=binji

Review URL: https://chromiumcodereview.appspot.com/9271061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119535 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-28 00:34:40 +00:00
saintlou@chromium.org
69c88e1805 Remove obsolete usage of TOUCH_UI.
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
2011-11-23 02:07:45 +00:00
rbyers@chromium.org
09996cf72c Differentiate TOUCH_UI builds in crash reporting.
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
2011-11-10 16:04:02 +00:00
thakis@chromium.org
698415277e Remove the remaining exit time destructors from base for linux and chromeos.
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
2011-11-09 21:55:08 +00:00
brettw@chromium.org
a42d4638f0 Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.
[ 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
2011-10-26 21:48:00 +00:00
brettw@chromium.org
2f4a8e1220 Revert 107042 - Replace most LOG/CHECK statements with DLOG/DCHECK 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
2011-10-25 03:06:12 +00:00
brettw@chromium.org
da7d86e75f Replace most LOG/CHECK statements with DLOG/DCHECK 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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107042 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-25 02:12:09 +00:00
robert.nagy@gmail.com
167ec827df OpenBSD patches for base and build, part 2
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
2011-10-24 22:05:27 +00:00
kmixter@chromium.org
cb7d53e31d Always search TIDs for the crashing processes.
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
2011-06-21 04:21:06 +00:00
david.mike.futcher@gmail.com
60ea605e06 Replacing outdated DCHECK(a == b) with DCHECK_EQ(a, b).
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
2011-04-18 20:07:08 +00:00
levin@chromium.org
3b63f8f451 Move some files from base to base/memory.
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
2011-03-28 01:54:15 +00:00
brettw@chromium.org
20305ec6f1 Remove obsolete base/lock.h and fix up callers to use the new header file and
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
2011-01-21 04:55:52 +00:00
satish@chromium.org
dc8caba097 Rename all methods accessing Singleton<T> as GetInstance().
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
2010-12-13 16:52:35 +00:00
tfarina@chromium.org
a141675e90 Cleanup some duplicated includes.
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
2010-09-04 15:21:50 +00:00
mnissler@chromium.org
6dde9d7f2a Make crash reporting client_id accessible through child_process_logging.
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
2010-08-26 08:55:22 +00:00
tfarina@chromium.org
76b90d310d base: Rename EnvVarGetter to Environment.
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
2010-08-03 03:00:50 +00:00
thestig@chromium.org
6621831401 Linux: Guess the thread id for crashing renderers in a different PID namespace.
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
2010-07-16 19:28:17 +00:00
pvalchev@google.com
7cd70c394e Move non-linux specific code from base/linux_util to app/gtk_util
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
2010-05-13 22:06:01 +00:00
evan@chromium.org
1c657854c2 bsd: refactor XDG bits of linux_util into a shared file.
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
2010-04-22 23:28:05 +00:00
erg@chromium.org
11991c3c09 GTK: Improve xfce detection.
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
2010-04-15 20:40:17 +00:00
thestig@chromium.org
9bc8cff2f2 Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h and 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
2010-04-03 01:05:39 +00:00
erg@chromium.org
88c50ab803 GTK: Turn on the GTK+ integration by default.
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
2010-03-26 20:04:06 +00:00
pvalchev@google.com
66700d4494 BSD port changes for base/ (OS_POSIX/GTK instead of OS_LINUX
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
2010-03-10 07:46:43 +00:00
thestig@chromium.org
9e9b6e8ee7 Move some XDG code from chrome to base, make DIR_USER_CACHE generic rather 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
2009-12-02 08:45:01 +00:00
mdm@chromium.org
b8ecd144b5 Properly detect KDE4 on newer systems (e.g. [K]Ubuntu 9.04).
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
2009-11-25 21:59:22 +00:00
thestig@chromium.org
85ebe8f925 Move FileDescriptorGetInode() and FindProcessHoldingSocket() into 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
2009-10-29 04:02:55 +00:00
thestig@chromium.org
94aa5bb1cf Trim the lsb_release output in GetLinuxDistro.
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
2009-10-21 22:09:33 +00:00
thestig@chromium.org
78f6f51569 Simplify GetLinuxDistro() for Chrome OS.
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
2009-10-21 19:04:17 +00:00
cmasone@google.com
a4564b2f45 On Linux, Chrome uses lsb_release (a python script) to determine the name of 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
2009-10-19 16:19:56 +00:00
thestig@chromium.org
19467c0bcc Make GetLinuxDistro thread-safe.
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
2009-10-13 02:51:07 +00:00
mdm@chromium.org
c85cfbd98c Linux: make the "change proxy settings" button able to start several proxy 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
2009-08-20 23:14:57 +00:00
evan@chromium.org
d6cb85b664 linux: generalize desktop environment guessing to encompass KDE
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
2009-07-23 22:10:53 +00:00
mattm@chromium.org
87fc168b36 Try again: Add proxy config (using gnome-network-preferences)
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
2009-07-22 00:22:49 +00:00
mattm@chromium.org
200e80dc6a Revert "Add proxy config (using gnome-network-preferences)"
This reverts commit d06bc0c855b1e81e36c7bfc9bef342eb358d99a5.

TBR=estade

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21033 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-18 00:34:56 +00:00
mattm@chromium.org
425be73ff4 Add proxy config (using gnome-network-preferences)
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
2009-07-17 23:28:08 +00:00
thestig@chromium.org
912c64520e Include output of "lsb_release -d" in crash reports.
/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
2009-07-17 05:55:51 +00:00
sgk@google.com
75ae542de5 Eliminate a circular dependency by making BGRAToRGBA() generic (no pulling 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
2009-04-21 17:20:10 +00:00