summaryrefslogtreecommitdiffstats
path: root/base/process_util_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* FBTF: Move some heavy, repeatedly emitted symbols to implementation files.erg@google.com2010-08-301-0/+1
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3162047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57896 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gtest warnings when running the process_util_unittest.levin@chromium.org2010-08-231-48/+109
| | | | | | | | | | | | | | | When I run them on OSX, I get a gtest warning about multiple threads: "Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test detected 2 threads." This patch fixes the warnings. BUG=43165 TEST=base_unittest --gtest_filter=OutOfMemoryDeathTest.* Review URL: http://codereview.chromium.org/3201009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57118 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land part of r55416, minus actually moving the test_suite.h contents to a ↵brettw@chromium.org2010-08-171-6/+7
| | | | | | | | | | | | | | | | | | | | | | | .cc file. Cleanup in base. This moves the implementation (and a bunch of header file dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56399 0039d316-1c4b-4281-b951-d872f2087c98
* CommandLine: eliminate wstring-accepting AppendLooseValueevan@chromium.org2010-08-131-6/+4
| | | | | | | | Instead use AppendArg variants which accept a FilePath or an ASCII string. Review URL: http://codereview.chromium.org/3134008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56100 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 55400 - Cleanup in base. This moves the implementation (and a bunch ↵nsylvain@chromium.org2010-08-091-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | of header file dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/3035062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55416 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in base. This moves the implementation (and a bunch of header filebrettw@chromium.org2010-08-091-6/+7
| | | | | | | | | | | | | | | | | | | dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55400 0039d316-1c4b-4281-b951-d872f2087c98
* Add #include utf_string_conversions.h to all files that use ASCIIToWide andbrettw@chromium.org2010-08-031-1/+2
| | | | | | | | | | | | | | | ASCIIToUTF16. I removed string_util includes from a few places where it obviously wasn't needed. In a separate pass, I'm going to remove ASCIITo* from string_util, then I'm going to do an even later pass to find the unnecessary string_util.h includes and remove them. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3058027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54746 0039d316-1c4b-4281-b951-d872f2087c98
* Add an AppendSwitchASCII to CommandLine, and convert a test to it.evan@chromium.org2010-07-301-6/+6
| | | | | | | | | | | I'm removing all the AppendSwitchWithValue() users due to wstrings, and this is one caller. Since fixing this one caller requires touching many files, I thought I'd isolate this change from the other WithValue->ASCII conversions. Review URL: http://codereview.chromium.org/2878065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54257 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 53903 - Revert 52613 - Revert 52608 - Add and alternative ↵viettrungluu@chromium.org2010-07-281-74/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GetAppOutput() to process_util that takes a timeout. [For those keeping track, this removes it again. The failure wasn't a flake. :(] [Undoing the revert to see if the failure wasn't a flake.... Revert if the original failure, below, occurs again.] ["base_unittests" didn't exit cleanly on "Chromium Linux x64" but was killed due to timeout.] Contributed by tessamac@chromium.org TEST=none BUG=47356 Review URL: http://codereview.chromium.org/2810014 Patch from Tessa MacDuff <tessamac@chromium.org>. TBR=viettrungluu@chromium.org, tessamac@chromium.org Review URL: http://codereview.chromium.org/3012004 TBR=viettrungluu@chromium.org, tessamac@chromium.org Review URL: http://codereview.chromium.org/3036023 TBR=viettrungluu@chromium.org, tessamac@chromium.org Review URL: http://codereview.chromium.org/3045018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53908 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 52613 - Revert 52608 - Add and alternative GetAppOutput() to ↵viettrungluu@chromium.org2010-07-281-8/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | process_util that takes a timeout. [Undoing the revert to see if the failure wasn't a flake.... Revert if the original failure, below, occurs again.] ["base_unittests" didn't exit cleanly on "Chromium Linux x64" but was killed due to timeout.] Contributed by tessamac@chromium.org TEST=none BUG=47356 Review URL: http://codereview.chromium.org/2810014 Patch from Tessa MacDuff <tessamac@chromium.org>. TBR=viettrungluu@chromium.org, tessamac@chromium.org Review URL: http://codereview.chromium.org/3012004 TBR=viettrungluu@chromium.org, tessamac@chromium.org Review URL: http://codereview.chromium.org/3036023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53903 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 52608 - Add and alternative GetAppOutput() to process_util that takes ↵viettrungluu@chromium.org2010-07-161-74/+8
| | | | | | | | | | | | | | | | | | | | a timeout. ["base_unittests" didn't exit cleanly on "Chromium Linux x64" but was killed due to timeout.] Contributed by tessamac@chromium.org TEST=none BUG=47356 Review URL: http://codereview.chromium.org/2810014 Patch from Tessa MacDuff <tessamac@chromium.org>. TBR=viettrungluu@chromium.org, tessamac@chromium.org Review URL: http://codereview.chromium.org/3012004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52613 0039d316-1c4b-4281-b951-d872f2087c98
* Add and alternative GetAppOutput() to process_util that takes a timeout.viettrungluu@chromium.org2010-07-161-8/+74
| | | | | | | | | | | | Contributed by tessamac@chromium.org TEST=none BUG=47356 Review URL: http://codereview.chromium.org/2810014 Patch from Tessa MacDuff <tessamac@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52608 0039d316-1c4b-4281-b951-d872f2087c98
* Catch OOMs in purgeable memory.avi@chromium.org2010-07-011-0/+43
| | | | | | | | | | | Recommit of r51371, this time not crashy. BUG=http://crbug.com/47980 TEST=unit tested Review URL: http://codereview.chromium.org/2817048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51407 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 51371 - Catch OOMs in purgeable memory.avi@chromium.org2010-07-011-43/+0
| | | | | | | | | | | | BUG=http://crbug.com/47980 TEST=unit tested Review URL: http://codereview.chromium.org/2859036 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/2883014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51373 0039d316-1c4b-4281-b951-d872f2087c98
* Catch OOMs in purgeable memory.avi@chromium.org2010-07-011-0/+43
| | | | | | | | | BUG=http://crbug.com/47980 TEST=unit tested Review URL: http://codereview.chromium.org/2859036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51371 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanups of usage of process_util code.maruel@chromium.org2010-06-111-14/+21
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2791006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49568 0039d316-1c4b-4281-b951-d872f2087c98
* Changed the position of the output->swap() call. This way, even if the ↵maruel@chromium.org2010-06-101-4/+3
| | | | | | | | | | command encounters an error, we still record the output. This is important for the case when stderr has been redirected to stdout, and we'd like to see stdout even when the exit code is non-zero. Patch contributed by Michael Williamson. Review URL: http://codereview.chromium.org/2665004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49423 0039d316-1c4b-4281-b951-d872f2087c98
* Patch out posix_memalign in the out-of-memory killer.avi@chromium.org2010-05-191-7/+19
| | | | | | | | | BUG=http://crbug.com/44189 TEST=included in base_unittests Review URL: http://codereview.chromium.org/2110010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47714 0039d316-1c4b-4281-b951-d872f2087c98
* 64-bit support for Mac OS X in base_unittests.mark@chromium.org2010-05-141-1/+11
| | | | | | | | BUG=44127, 18323 TEST=64-bit base_unittests should all pass Review URL: http://codereview.chromium.org/2126001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47275 0039d316-1c4b-4281-b951-d872f2087c98
* Move common code into process_util.cc.maruel@chromium.org2010-04-291-59/+69
| | | | | | | | | | | | | Fix namespace usage. Change ProcessEntry to have a common interface accross platforms and change ProcessFilter::Includes() to make use of it. Split NamedProcessIterator in two. BUG=none TEST=none Review URL: http://codereview.chromium.org/1689012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45953 0039d316-1c4b-4281-b951-d872f2087c98
* Make DidProcessCrash a bit more solid and accurate on Windowsphajdan.jr@chromium.org2010-04-061-0/+18
| | | | | | | | | | | | | I hit the NOTREACHED() inside it while debugging an unrelated problem. Also, now there is one less special case in this function's contract. TEST=none BUG=38048 Review URL: http://codereview.chromium.org/1315009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43706 0039d316-1c4b-4281-b951-d872f2087c98
* Die on an OOM situation in many more cases.avi@chromium.org2010-03-191-4/+42
| | | | | | | | | | | Continuation of http://codereview.chromium.org/875004 after a revert. BUG=http://crbug.com/12673 TEST=run out of memory and die Review URL: http://codereview.chromium.org/1039007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42127 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 41834; ui tests are asploding.avi@chromium.org2010-03-171-42/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41837 0039d316-1c4b-4281-b951-d872f2087c98
* Die on an OOM situation in many more cases.avi@chromium.org2010-03-171-4/+42
| | | | | | | | | BUG=http://crbug.com/12673 TEST=run out of memory and die Review URL: http://codereview.chromium.org/875004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41834 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: don't allocate memory after forking.agl@chromium.org2010-03-111-0/+101
| | | | | | | | | | | | | | | | | Previously we would allocate memory in the child process. However, the allocation might have happened while the malloc lock was held, resulting in a deadlock. This patch removes allocation from the child but probably makes Mac's startup time slower until a Mac person can implement dir_reader_posix.h. TEST=Unittest for new code BUG=36678 http://codereview.chromium.org/672003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41275 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "POSIX: don't allocate memory after forking."agl@chromium.org2010-03-101-42/+0
| | | | | | Appears to break tlslite on the Mac. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41190 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: don't allocate memory after forking.agl@chromium.org2010-03-101-0/+42
| | | | | | | | | | | | | | | | | Previously we would allocate memory in the child process. However, the allocation might have happened while the malloc lock was held, resulting in a deadlock. This patch removes allocation from the child but probably makes Mac's startup time slower until a Mac person can implement dir_reader_posix.h. TEST=Unittest for new code BUG=36678 http://codereview.chromium.org/672003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41181 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r40289: "Add support for CHECK_* macros.""willchan@chromium.org2010-03-021-1/+1
| | | | | | | | Make sure DEFINE_CHECK_OP_IMPL isn't omitted for official builds. Review URL: http://codereview.chromium.org/661325 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40327 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r40289: "Add support for CHECK_* macros."willchan@chromium.org2010-03-011-1/+1
| | | | | | | | Broke official build compilation (only worked on debug/release builds). Review URL: http://codereview.chromium.org/661298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40296 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for CHECK_* macros.willchan@chromium.org2010-03-011-1/+1
| | | | | | | | Convert a few places to make sure it works. Review URL: http://codereview.chromium.org/660221 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40289 0039d316-1c4b-4281-b951-d872f2087c98
* Merge the LINUX_TC_MALLOC #define with the existing TC_MALLOC #define.thestig@chromium.org2010-02-261-5/+5
| | | | | | | | BUG=36687 TEST=about:tcmalloc, etc, works when tcmalloc is enabled on Linux. Review URL: http://codereview.chromium.org/660118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40080 0039d316-1c4b-4281-b951-d872f2087c98
* linux: check the return value passed through HANDLE_EINTRevan@chromium.org2010-02-021-6/+13
| | | | | | | | | | A smarter compiler (clang) can notice that we were not using the return values being passed through HANDLE_EINTR, which meant most frequently that we were missing checking the return value of close(). Review URL: http://codereview.chromium.org/569003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37786 0039d316-1c4b-4281-b951-d872f2087c98
* Add a utility function to run a process as an arbitrary usercpu@chromium.org2010-02-011-0/+9
| | | | | | | | | | | | | - Only for windows - Needed in certain upgrade scenarios, useful for all BUG=32474 TEST= unit tests included Review URL: http://codereview.chromium.org/555192 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37682 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: reenable malloc overrides.agl@chromium.org2010-01-081-41/+11
| | | | | | | | | | | | | | | | | (These were disabled in r35804 and r35810.) This time we are using the __libc_* names to get at the real glibc functions rather than dlsym. This now means that code that calls __libc_* gets the raw functions, not 'safe' ones. Also, this sets the visibility correctly. Previously we were not overriding malloc calls made in shared libraries. BUG=31809 TEST=Covered by unittests. http://codereview.chromium.org/533001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35823 0039d316-1c4b-4281-b951-d872f2087c98
* Also disable tests for code removed in r35804.agl@chromium.org2010-01-081-0/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35810 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: stop zombie ps processes from being created.viettrungluu@chromium.org2010-01-041-0/+22
| | | | | | | | | | | | | | | This fixes two bugs: - the output buffer for the ps command being run could be too small (fix: buffer enlargened); and - if the output buffer was too small, waitpid() wouldn't be called (fix: always call waitpid(), obviously). BUG=31378 TEST=On a big, long-running Chrome/Chromium (with many processes, e.g., renderers), check that there are no zombie ps processes (with PPID the browser process); looking at about:memory may help speed up the creation of such zombies. Also, run the new test, ProcessUtilTest.GetAppOutputRestrictedNoZombies. Review URL: http://codereview.chromium.org/523033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35456 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to base/ from a combination of FreeBSD and OpenBSD patches.evan@chromium.org2009-12-291-0/+1
| | | | | | Review URL: http://codereview.chromium.org/495002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35321 0039d316-1c4b-4281-b951-d872f2087c98
* Enable TCMalloc on Linux by default.willchan@chromium.org2009-11-251-1/+14
| | | | | | | | | | This change also reworks the tcmalloc dependency to be added only to chrome and test_shell, instead of base. This is necessary since otherwise tcmalloc will be double initialized (by both the main executable and dlopen'd shared objects like the npapitestplugin.so). Add valgrind suppressions. This are invalid reads on static initialization in the VDSOSupport module. I haven't investigated it yet, but I suspect they're benign. BUG=http://crbug.com/28149, http://crbug.com/28385 Review URL: http://codereview.chromium.org/399081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33010 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix a warning in the process_util unittestvandebo@chromium.org2009-11-241-4/+5
| | | | | | | | | | | Original review: http://codereview.chromium.org/422003 BUG=none TEST=compiles on gcc 4.4 Review URL: http://codereview.chromium.org/431034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32972 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix a warning in the process_util unittestevan@chromium.org2009-11-201-1/+4
| | | | | | Review URL: http://codereview.chromium.org/422003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32648 0039d316-1c4b-4281-b951-d872f2087c98
* For Linux, override malloc and friends so that we can detect and then stop ↵vandebo@chromium.org2009-11-181-0/+94
| | | | | | | | | | | on out of memory. BUG=27222 TEST=new base unittests Review URL: http://codereview.chromium.org/391044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32395 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Implement about:memory.viettrungluu@chromium.org2009-11-051-0/+45
| | | | | | | | | | | | | | | This implements about:memory on Mac. It calls /bin/ps to obtain information about processes (this is Apple's officially supported "API"). Unfortunately, ps provides fairly minimal information (rss and vsize); top is better, but not a stable API -- it has changed greatly between Mac OS 10.5 and 10.6, and moreover the 10.6 version is more limited in its output formatting. BUG=9653 TEST=Go to about:memory under a variety of conditions (with a variety of browsers loaded). Review URL: http://codereview.chromium.org/333008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31168 0039d316-1c4b-4281-b951-d872f2087c98
* Lower priorities of background tabs on linux.davemoore@chromium.org2009-10-291-0/+14
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/345009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30470 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated CommandLine(std::wstring) ctor.evan@chromium.org2009-10-261-4/+4
| | | | | | | | | | | Add a ctor for creating a CommandLine for carrying arguments; convert all the users to either that or the FilePath version. BUG=24672 Review URL: http://codereview.chromium.org/329017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30117 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ProcessUtilTest.FDRemapping hang on x86_64 by counting open fds in child ↵dkegel@google.com2009-10-201-1/+3
| | | | | | | | | | | process nondestructively BUG=25270 TEST=base_unittests --gtest_filter=ProcessUtilTest.FDRemapping on x86_64 linux Review URL: http://codereview.chromium.org/293018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29570 0039d316-1c4b-4281-b951-d872f2087c98
* Turn NULL used as int to 0.phajdan.jr@chromium.org2009-10-131-2/+2
| | | | | | | | | | | | | (Excluding chrome/browser/...) Landing patch for Jacob Mandelson. Original review: http://codereview.chromium.org/195067 BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/267076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28810 0039d316-1c4b-4281-b951-d872f2087c98
* linux: implement GetCPUUsage() so the task manager shows CPUevan@chromium.org2009-09-191-0/+20
| | | | | | | | | | | | | Discussed in part here: http://groups.google.com/group/chromium-dev/browse_thread/thread/8e91f66f9af6ccec This implements option 3, which turned out to be pretty simple. BUG=19864 Review URL: http://codereview.chromium.org/215020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26647 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-2/+2
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-281-2/+2
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* linux: call g_thread_init() at relevant startup pointsevan@chromium.org2009-08-251-28/+29
| | | | | | | | | | | | | | | | | | According to glib docs, we need to do this if it's at all possible for us to hit glib on multiple threads. This may be happening when we grab plugin metadata from the file thread. Rather than explicitly depending on gthread all over the place, just put it in with the GTK dep (since anywhere we're using GTK we ought to init gthread). (Note that this is *not* initializing the GDK locking system.) BUG=18957 Review URL: http://codereview.chromium.org/174264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24207 0039d316-1c4b-4281-b951-d872f2087c98