summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Lands http://codereview.chromium.org/99349 for Ryan.sky@chromium.org2009-05-042-0/+11
| | | | | | | | | | | | | | Comments from Ryan: Some small changes to get chromium building on ARM. I tested these using the standard Linux tool chain and crosstools-ng. BUG=none TEST=none Review URL: http://codereview.chromium.org/99365 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15241 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land r15232 with a warnings fix:tc@google.com2009-05-043-670/+1399
| | | | | | | | | | | | | | | | | | | Merge latest changes from http://www.netlib.org/fp/dtoa.c into dtoa.cc This should fix the gcc 4.4. strict aliasing issues. More info here: http://patrakov.blogspot.com/2009/03/dont-use-old-dtoac.html Also update gcc_warnings.patch to match. BUG=9104 Original change by Craig Schlenter via http://codereview.chromium.org/99315 Review URL: http://codereview.chromium.org/99367 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15236 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Merge latest changes from http://www.netlib.org/fp/dtoa.c into dtoa.cc"tc@google.com2009-05-043-1390/+670
| | | | | | | | | This reverts commit r15232. Review URL: http://codereview.chromium.org/99366 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15233 0039d316-1c4b-4281-b951-d872f2087c98
* Merge latest changes from http://www.netlib.org/fp/dtoa.c into dtoa.cctc@google.com2009-05-043-670/+1390
| | | | | | | | | | | | | | | | | This should fix the gcc 4.4. strict aliasing issues. More info here: http://patrakov.blogspot.com/2009/03/dont-use-old-dtoac.html Also update gcc_warnings.patch to match. BUG=9104 Original change by Craig Schlenter <craig.schlenter@gmail.com> via http://codereview.chromium.org/99315 Review URL: http://codereview.chromium.org/99364 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15232 0039d316-1c4b-4281-b951-d872f2087c98
* Delete unused stuff from basictypes.h.willchan@chromium.org2009-05-041-13/+0
| | | | | | Review URL: http://codereview.chromium.org/99348 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15208 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Add a macro for handling EINTR.agl@chromium.org2009-05-0112-90/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On POSIX systems, system calls can be interrupted by signals. In this case, they'll return EINTR, indicating that the system call needs to be restarted. (The situation is a little more complicated than this with SA_RESTART, but you can read man 7 signal if you like.) The short of it is that you need to catch EINTR and restart the call for these system calls: * read, readv, write, writev, ioctl * open() when dealing with a fifo * wait* * Anything socket based (send*, recv*, connect, accept etc) * flock and lock control with fcntl * mq_ functions which can block * futex * sem_wait (and timed wait) * pause, sigsuspend, sigtimedwait, sigwaitinfo * poll, epoll_wait, select and 'p' versions of the same * msgrcv, msgsnd, semop, semtimedop * close (although, on Linux, EINTR won't happen here) * any sleep functions (careful, you need to handle this are restart with different arguments) We've been a little sloppy with this until now. This patch adds a macro for dealing with this and corrects every case of these system calls (that I found). The macro is HANDLE_EINTR in base/eintr_wrapper.h. It's safe to include on Windows and is a no-op there. On POSIX, it uses GCC magic to return the correct type based on the expression and restarts the system call if it throws EINTR. And you can use it like: HANDLE_EINTR(close(fd)); Or: ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, len)); *BEWARE* that it will evaluate the argument multiple times, so this is not safe: HANDLE_EINTR(close(FireMissiles())); http://groups.google.com/group/chromium-dev/browse_thread/thread/41a35b2a457d73a0 http://codereview.chromium.org/100225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15102 0039d316-1c4b-4281-b951-d872f2087c98
* Add atomic operations for ARM.thestig@chromium.org2009-05-012-0/+126
| | | | | | Review URL: http://codereview.chromium.org/57031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15070 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate wstring version of PathService::Get() in webkit.thestig@chromium.org2009-05-013-6/+8
| | | | | | Review URL: http://codereview.chromium.org/99266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15032 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Add code for shuffling file descriptors.agl@chromium.org2009-04-307-30/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | When forking a child process, one often wants to move existing file descriptors to well known locations (stdout, stderr etc). However, this is a process bedeviled with corner cases. Consider the case where you open two file descriptors, get assigned fds 1 and 0 for them and wish to shuffle them so that they end up in slots 0 and 1. Our current code fails in this case. We also have a problem where we're currently trying to mark file descriptors as close-on-exec rather than closing them in the child process. This is inherently broken in a multithreaded process where another thread can open a file descriptor and race the loop which is trying to mark them. Thus, on Linux we switch to close-after-fork where we known that no other threads exist in the process. On Mac, the code is sufficiently different that this simple fix isn't applicable and one of the Mac folks will need to take a look. http://codereview.chromium.org/100127 BUG=11174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14978 0039d316-1c4b-4281-b951-d872f2087c98
* Add DirectoryWatcher implementation for Mac.phajdan.jr@chromium.org2009-04-303-74/+232
| | | | | | | | | | | | This uses FSEvents and supports both recursive and non-recursive modes. TEST=Make sure that tests matching DirectoryWatcherTest.* from base_unittests pass on Mac. http://crbug.com/10967 Review URL: http://codereview.chromium.org/99057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14977 0039d316-1c4b-4281-b951-d872f2087c98
* Make task_manager_resource_providers.cc compile on POSIX.phajdan.jr@chromium.org2009-04-303-0/+28
| | | | | | | | TEST=Make sure that the task manager isn't obviously broken on Windows. Review URL: http://codereview.chromium.org/93067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14934 0039d316-1c4b-4281-b951-d872f2087c98
* Support for showing memory usage of 64-bit IE in a 32-bit Chromium mbelshe@google.com2009-04-291-14/+23
| | | | | | | | | This is a changelist for http://codereview.chromium.org/75031 by Kent Tamura (tkent@google.com) Review URL: http://codereview.chromium.org/100111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14846 0039d316-1c4b-4281-b951-d872f2087c98
* ImportantFileWriterphajdan.jr@chromium.org2009-04-284-24/+29
| | | | | | | | | | | | | | Introducing a class for writing important files, preventing their corruption during writing. Switched PrefService to use it. Other classes will be switched in future changesets. TEST=This may affect things using preferences. Make sure that changes in preferences don't get lost, and that you don't get excessive disk activity when changing preferences. http://crbug.com/10618 Review URL: http://codereview.chromium.org/83001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14717 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: don't spawn zombies.agl@chromium.org2009-04-284-16/+38
| | | | | | | | | http://codereview.chromium.org/93147 BUG=9401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14705 0039d316-1c4b-4281-b951-d872f2087c98
* Lands http://codereview.chromium.org/99007 for Yuta.sky@chromium.org2009-04-271-53/+29
| | | | | | | | | BUG=11003 TEST=none Review URL: http://codereview.chromium.org/100079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14685 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r14620 which was a rollback of r14549 and r14508. Thistc@google.com2009-04-271-2/+7
| | | | | | | | | | | | change re-enables the ui tests. Since jam re-enabled some tests, I had to #ifdef around 4 tests that are not shutting down cleanly on linux. It looks like we have renderers that aren't shutting down properly (pegged at 100% cpu). Review URL: http://codereview.chromium.org/100061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14680 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Make --user-data-dir work when it doesn't exist.agl@chromium.org2009-04-272-1/+6
| | | | | | | | | | | | | | | | | Previously, --user-data-dir called PathService::Override which called AbsolutePath. On POSIX, this calls realpath and fails if the given path doesn't actually exist. We need to do this on Windows because we change the current directory in order to load plugins (at least). However, on POSIX we shouldn't ever change cwd. So, on POSIX, don't try to make the user-data-dir absolute. TEST=On POSIX, start chrome with --user-data-dir=/tmp/xyz (where xyz is a directory which doesn't exist). Once running, check that /tmp/xyz exists and contains the expected files. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14679 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding this. jcampan@chromium.org2009-04-271-1/+2
| | | | | | | | | | | | | | | | | | | The Ole unitialization was failing on one of the Vista build-bot. It is not clear when the Ole initialization is balanced when a CRichEditCtrl is created/destructed. So I now turn it off explicitly. This CL makes sure we unregister our Windows window classes when shut-down. It also balances-out an OLE initialization performed by the CRichEditCTRL. This is necessary for allowing to reload chrome.dll in a process, which is what the browser tests will do. BUG=None TEST=None Review URL: http://codereview.chromium.org/101004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14649 0039d316-1c4b-4281-b951-d872f2087c98
* More linux ifdef tweaks. This reverts my earlier change (13503).sky@chromium.org2009-04-274-16/+8
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/100046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14628 0039d316-1c4b-4281-b951-d872f2087c98
* Disable some warnings in third party code so I can turn on -Werror.tc@google.com2009-04-272-27/+40
| | | | | | | Review URL: http://codereview.chromium.org/101005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14622 0039d316-1c4b-4281-b951-d872f2087c98
* Speculatively roll back r14549 and r14508. The chrome browsertc@google.com2009-04-271-7/+2
| | | | | | | | | | | | process is pegged at 100% cpu after ui_tests has exited. Seeing if this is the cause. Will re-roll forward if it's not. TBR=estade Review URL: http://codereview.chromium.org/100047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14620 0039d316-1c4b-4281-b951-d872f2087c98
* Only check errno when it can be set.phajdan.jr@chromium.org2009-04-271-1/+1
| | | | | | | | This is a follow-up after http://codereview.chromium.org/77022 Review URL: http://codereview.chromium.org/99055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14602 0039d316-1c4b-4281-b951-d872f2087c98
* Change Size::IsEmpty() to be consistent with Rect::IsEmpty()erikkay@google.com2009-04-265-23/+46
| | | | | | | | | | | Change Size to not accept negative dimensions to be consistent with Rect. BUG=10992 TEST=base_unittests.exe --gtest_filter=RectTest.IsEmpty Review URL: http://codereview.chromium.org/93131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14567 0039d316-1c4b-4281-b951-d872f2087c98
* Port unload_uitest.cc and enable some of the tests on linux.estade@chromium.org2009-04-241-2/+7
| | | | | | | | Make WaitForSingleProcess respect base::kNoTimeout (which is equivalent to INFINITE on windows). Review URL: http://codereview.chromium.org/99008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14508 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "POSIX: Don't spawn zombies." (r14488)agl@chromium.org2009-04-243-26/+7
| | | | | | | | Something else is trying to reap children in the ui_tests and causing a mess. Reverting since it's a Friday night. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14499 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 14489.jcampan@chromium.org2009-04-241-1/+0
| | | | | | Review URL: http://codereview.chromium.org/99004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14492 0039d316-1c4b-4281-b951-d872f2087c98
* This CL makes sure we unregister our Windows window classes when shut-down.jcampan@chromium.org2009-04-241-0/+1
| | | | | | | | | | | | It also balances-out an OLE initialization performed by the CRichEditCTRL. This is necessary for allowing to reload chrome.dll in a process, which is what the browser tests will do. BUG=None TEST=None Review URL: http://codereview.chromium.org/93026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14489 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Don't spawn zombies.agl@chromium.org2009-04-243-7/+26
| | | | | | | | TEST=Navigate to several different sites and check that no Chrome zombies are roaming around. BUG=9401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14488 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of variable length arrays.willchan@chromium.org2009-04-244-11/+13
| | | | | | Review URL: http://codereview.chromium.org/92005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14440 0039d316-1c4b-4281-b951-d872f2087c98
* Disable TimerTest.RepeatingTimer_Cancel under Valgrindnirnimesh@chromium.org2009-04-241-1/+2
| | | | | | Review URL: http://codereview.chromium.org/93003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14422 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated file_util::GetFilenameWithoutExtensionFromPath(), also ↵thestig@chromium.org2009-04-242-9/+0
| | | | | | | | convert ElideFilename() to take a FilePath. Review URL: http://codereview.chromium.org/92060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14409 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: unit tests fix.agl@chromium.org2009-04-241-0/+4
| | | | | | | | The unit tests will try and create a RenderViewHost with a NULL widget. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14406 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: use opaque NativeViewIdsagl@chromium.org2009-04-245-10/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we are still passing GtkWidget* into the renderer and trusting the value on the way out. With this patch we switch to using opaque values. These opaque values are handled by a GtkNativeViewIdManger, a singleton object which maintains the list of currently valid ids and their current X window ids. We don't pass the X window ids directly to the renderer because they are a) guessable and b) possibly variable for a GtkWidget. From a patch size point of view, the X window isn't current created at the point where we need it so significant work would be needed to reorder operations to fix that as well. This patch also removes the GTK accesses from the BACKGROUND_X11 thread which were a temporary hack. http://codereview.chromium.org/92110 BUG=9014,9869,10787 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14405 0039d316-1c4b-4281-b951-d872f2087c98
* Symbols aren't always present, which causes this test to fail. In ↵ajwong@chromium.org2009-04-241-0/+5
| | | | | | | | particular, symbols are not present on the buildbot which means this test always fails on the buildbot. Disabling the code for now to bring the tree green. Review URL: http://codereview.chromium.org/92112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14401 0039d316-1c4b-4281-b951-d872f2087c98
* Print backtraces on FATAL log messages in debug mode.ajwong@chromium.org2009-04-246-15/+307
| | | | | | | | This provides basic support for looking up backtrace information on GNU libc systems and in Windows. The code is only enabled for FATAL log messages in debug mode. In a release build, it is unlikely that symbols will be available making the backtrace less useful. Review URL: http://codereview.chromium.org/62140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14391 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Flash (and other plugins) to be installed without restarting the ↵jam@chromium.org2009-04-232-6/+4
| | | | | | | | | | | browser. This works by monitoring the MozillaPlugins registry key and reloading the plugin list afterwards. Note: I'll commit the WebKit change separately, but putting it in this change right now so everything can be reviewed together. BUG=10574 Review URL: http://codereview.chromium.org/88020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14377 0039d316-1c4b-4281-b951-d872f2087c98
* linux (and some posix): multiprocess plugins compiling.evan@chromium.org2009-04-232-0/+12
| | | | | | | | | | | | | | | | | | | The goal of this change is to *not* make any behavioral change, but to instead just get all the plugin-related files linking on Linux with a bunch of NOTIMPLEMENTED()s in the appropriate places. It's enormous enough already without any refactorings or new features. Changes include: - Lots of gcc warning fixes. - Use portable replacements for Windows-specific functions (_strdup, etc.). - Use TransportDIB instead of just shared memory in the plugin messaging. Note that this is not fleshed out on Linux and on Windows it just hacks in the existing handles so there should be no functional change. - Fix --plugin-launcher to use cross-platform APIs. Review URL: http://codereview.chromium.org/79020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14338 0039d316-1c4b-4281-b951-d872f2087c98
* Disabling flaky StatsTableTest.MultipleThreads on Linux too.robertshield@google.com2009-04-231-3/+2
| | | | | | | | | | | Fails here for example: http://build.chromium.org/buildbot/waterfall/builders/Modules%20Linux%20(dbg)/builds/7281/steps/base_unittests/logs/stdio BUG=http://code.google.com/p/chromium/issues/detail?id=10611 Review URL: http://codereview.chromium.org/92075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14330 0039d316-1c4b-4281-b951-d872f2087c98
* The PPID is in kp_eproc, not kp_proc. (The field we were previously looking ↵avi@google.com2009-04-231-1/+1
| | | | | | | | at was always zero.) Review URL: http://codereview.chromium.org/96009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14316 0039d316-1c4b-4281-b951-d872f2087c98
* Submitting http://codereview.chromium.org/87039 on behalf of hamaji.erikkay@google.com2009-04-232-3/+20
| | | | | | Review URL: http://codereview.chromium.org/92053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14304 0039d316-1c4b-4281-b951-d872f2087c98
* Protect RandUint64 against EINTR.phajdan.jr@chromium.org2009-04-233-3/+24
| | | | | | Review URL: http://codereview.chromium.org/77022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14297 0039d316-1c4b-4281-b951-d872f2087c98
* Fix problem with bookmark bar introduced by window sharing; prefjrg@chromium.org2009-04-231-0/+6
| | | | | | | | | | | | change needs to change all open windows with the same preferences, not just the current one). Improve unit testing. Limit bookmark menu size width (1st pass). Cleanup/delete of code which no longer does much. Review URL: http://codereview.chromium.org/79068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14282 0039d316-1c4b-4281-b951-d872f2087c98
* Enable more tests, change a NOTREACHED to a bug since it's not fatal in the ↵pinkerton@chromium.org2009-04-221-1/+1
| | | | | | | | download code. Get other tests compiling even if disabled. Mark why tests are failing in gyp file. Review URL: http://codereview.chromium.org/92033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14239 0039d316-1c4b-4281-b951-d872f2087c98
* Ensures we don't leak handles in ProcessUtil::GetAppOutput.jcampan@chromium.org2009-04-221-7/+7
| | | | | | | | TEST=Run base_unit_tests BUG=None Review URL: http://codereview.chromium.org/93030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14235 0039d316-1c4b-4281-b951-d872f2087c98
* StopWatchingFileDescriptor needs to free struct event.dkegel@google.com2009-04-223-11/+108
| | | | | | | | | | | Also, there's no point in using scoped_ptr for event_ anymore, so removed that. Should fix http://crbug.com/10503 "Crash in network layer" Review URL: http://codereview.chromium.org/87045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14233 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DIR_SOURCE_ROOT to work in bundles like Chromium.app. Add more ui tests. ↵pinkerton@chromium.org2009-04-221-4/+16
| | | | | | | | Add a resource for tabs with no title on mac. Fix window title reporting. Remove the Browser dependency from the tab strip (only needs a TabStripModel). Review URL: http://codereview.chromium.org/93025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14212 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 14152.thestig@chromium.org2009-04-215-9/+21
| | | | | | | TBR=tony Review URL: http://codereview.chromium.org/87066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14154 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using and remove deprecated file_util::TrimTrailingSeparator().thestig@chromium.org2009-04-215-21/+9
| | | | | | Review URL: http://codereview.chromium.org/67271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14152 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a leak when we fail to load a gdkpixbuf. I meant to do this intc@google.com2009-04-211-0/+24
| | | | | | | | | the last change, but forgot. Review URL: http://codereview.chromium.org/69042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14143 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using and remove deprecated file_util::TrimFilename().thestig@chromium.org2009-04-212-12/+0
| | | | | | Review URL: http://codereview.chromium.org/67267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14142 0039d316-1c4b-4281-b951-d872f2087c98