summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Add support for almost-recursive watches in Linux DirectoryWatcherphajdan.jr@chromium.org2009-05-148-117/+294
| | | | | | | | | | | | | | | | | After this patch DirectoryWatcher when asked for recursive watch will scan the subtree and add inotify watches for each subfolder, but further changes to the tree structure won't trigger adding/removing watches. Support for really recursive watches is planned. This is just to divide the work, because the task is not easy. Based on patch by Janwar Dinata <j.dinata@gmail.com> reviewed at http://codereview.chromium.org/92151 http://crbug.com/8968 Review URL: http://codereview.chromium.org/115229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16070 0039d316-1c4b-4281-b951-d872f2087c98
* During shutdown delete any pending tasks if running under Valgrind.kuchhal@chromium.org2009-05-143-1/+3940
| | | | | | | | | BUG=10755 Review URL: http://codereview.chromium.org/115328 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16060 0039d316-1c4b-4281-b951-d872f2087c98
* Add match count text to the GTK find bar. This also makes the bar wider.brettw@chromium.org2009-05-142-0/+5
| | | | | | | | | | | | | | | | The match count text doesn't currently show up realiably because the data in the find reply is bad. I believe this is bug 11761. The clicker checking code has been moved to the cross-platform FindBarController so it doesn't have to be duplicated for each platform. This also add IntToString16. I didnt add all the variants now. The *Wstring versions should all eventually be changed to string16. http://crbug.com/11750 Review URL: http://codereview.chromium.org/114023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16058 0039d316-1c4b-4281-b951-d872f2087c98
* Extract Windows-specific parts of TaskManager.phajdan.jr@chromium.org2009-05-141-0/+10
| | | | | | | | | | | | | | - task_manager.cc compiles on POSIX - task_manager_unittest.cc passes on Linux - stub TaskManagerViewImpl for Linux (so that the unit test can pass) TEST=Task manager should not be obviously broken on Windows. http://crbug.com/11461 Review URL: http://codereview.chromium.org/115295 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16053 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 15832 since this test is finished.hbono@chromium.org2009-05-142-26/+0
| | | | | | | BUG=11046 "Need to back out hbono's test fix" Review URL: http://codereview.chromium.org/112021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16047 0039d316-1c4b-4281-b951-d872f2087c98
* Retry r16006.estade@chromium.org2009-05-142-0/+10
| | | | | | Review URL: http://codereview.chromium.org/113369 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16025 0039d316-1c4b-4281-b951-d872f2087c98
* Undo 16020glen@chromium.org2009-05-143-79/+74
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16021 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the new tab page to be themed (you may want to review DOMUIThemeSource ↵glen@chromium.org2009-05-143-74/+79
| | | | | | | | | | | | | as a whole and not just these changes). Change global std::strings to chars* in browser theme provider. Add ability for ReplaceStringPlaceHolder to take up to 9 replacements. BUG=11235,11685 Review URL: http://codereview.chromium.org/115172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16020 0039d316-1c4b-4281-b951-d872f2087c98
* revert r16006 due to msvc warning.estade@chromium.org2009-05-132-10/+0
| | | | | | | | TBR=playmobil Review URL: http://codereview.chromium.org/113367 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16007 0039d316-1c4b-4281-b951-d872f2087c98
* Properly convert from UTF8 to UTF16 in WebTextInputImpl.estade@chromium.org2009-05-132-0/+10
| | | | | | | | | String util changes by darin@chromium.org. BUG=11699 Review URL: http://codereview.chromium.org/115215 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a dependency problem in base.gyp, so that file_version_info_linux.hphajdan.jr@chromium.org2009-05-131-0/+4
| | | | | | | | is generated before it is used. Review URL: http://codereview.chromium.org/113256 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15960 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the explicit keyword from the ScopedComPtr constructor so it can be ↵maruel@chromium.org2009-05-132-1/+46
| | | | | | | | included in a STL container. Review URL: http://codereview.chromium.org/115247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15958 0039d316-1c4b-4281-b951-d872f2087c98
* This CL updates chrome to the latest version of skia, retrieved via DEPS, andsenorblanco@chromium.org2009-05-135-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | placed in third_party. All relevant skia changes (for all 3 platforms) have been upstreamed. Most of this CL is mind-numbingly repetitive. Things of interest are: skia.gyp (now points at third_party versions), DEPS, and SkUserConfig.h. stdint.h: Skia now requires C99 integer types, which MSVC doesn't support natively. I have put typedefs in config/win/stdint.h. Note that the new version of skia appears to render rects whose coordinates are "backwards" (ie., x2 < x1 or y2 < y1), which were formerly culled. There were a couple obvious instances of this in the code which I fixed, but there may be more. There were ~35 layout test failures due to minor pixel differences which I rebaselined on Windows and Linux, and 8 genuine failures related to masks and stroked text, which I have put in text_expectations.txt and assigned to myself. (There was another change which broke ~1700 tests on each platform, but I put that change behind an #ifdef for now). R=brettw Review URL: http://codereview.chromium.org/65012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15949 0039d316-1c4b-4281-b951-d872f2087c98
* Use thread-safe localtime_r instead of localtime.thestig@chromium.org2009-05-131-4/+4
| | | | | | | BUG=11588 Review URL: http://codereview.chromium.org/115272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15922 0039d316-1c4b-4281-b951-d872f2087c98
* posix: directories should only be readable by the user.evan@chromium.org2009-05-122-4/+3
| | | | | | | | | | | | | Almost all the data we store is private, so we shouldn't even allow it to be group-readable. Note that files still obey the user's umask and if someone wants to make their download directory world-readable we won't undo that. BUG=11776 Review URL: http://codereview.chromium.org/113287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15890 0039d316-1c4b-4281-b951-d872f2087c98
* An experimental fix for Issue 11046.hbono@chromium.org2009-05-122-0/+26
| | | | | | | | | This change replaces some ImmAssociateContextEx() calls with a LoadLibrary() call and a GetProcAddress() call to prevent Chrome from loading "imm32.dll" on a PC which doesn't have valid "imm32.dll" installed. (Since I have not been able to reproduce this issue on my XP box, this is just a blind fix.) BUG=11046 "repeated crash on launch" Review URL: http://codereview.chromium.org/113096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15832 0039d316-1c4b-4281-b951-d872f2087c98
* Add new tab startup test to the linux & mac build.tc@google.com2009-05-121-2/+1
| | | | | | | Review URL: http://codereview.chromium.org/113229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15818 0039d316-1c4b-4281-b951-d872f2087c98
* Add memory stats for linux page cycler. On linux, we collecttc@google.com2009-05-114-3/+83
| | | | | | | | | the final RSS size and the total VM size. Review URL: http://codereview.chromium.org/113217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15814 0039d316-1c4b-4281-b951-d872f2087c98
* Remove executable bit from a bunch of files that shouldn't have it.evan@chromium.org2009-05-118-0/+0
| | | | | | | | | | (No code change.) git ls-tree -r HEAD | grep '^100755' | cut -f2 | egrep '\.(png|txt|mm|cc|h|checksum|asm|js|html|c|css|xml|grd|json)$' | xargs chmod a-x git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15809 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the popup blocking whitelist pref. This makes the whitelist ↵pkasting@chromium.org2009-05-092-18/+17
| | | | | | | | actually function.BUG=11440 Review URL: http://codereview.chromium.org/115149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15702 0039d316-1c4b-4281-b951-d872f2087c98
* Make Windows DirectoryWatcher also notify on directory operations (creation, ↵phajdan.jr@chromium.org2009-05-082-4/+2
| | | | | | | | | | | | etc). TEST=DirectoryWatcherTest.* from base_unittests should pass on Windows. http://crbug.com/11581 Review URL: http://codereview.chromium.org/115126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15637 0039d316-1c4b-4281-b951-d872f2087c98
* Blacklist test that crashes occasionally under Valgrind (and Purify).dkegel@google.com2009-05-071-0/+4
| | | | | | Review URL: http://codereview.chromium.org/115101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15581 0039d316-1c4b-4281-b951-d872f2087c98
* Implement BreakDebugger for ARM.deanm@chromium.org2009-05-071-2/+4
| | | | | | | Review URL: http://codereview.chromium.org/115087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15548 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a bug where we were inadvertently closing Valgrind-owned FDsrohitrao@chromium.org2009-05-061-23/+30
| | | | | | | | | | | when running under Valgrind. TEST=None http://crbug.com/11412 Review URL: http://codereview.chromium.org/108042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15414 0039d316-1c4b-4281-b951-d872f2087c98
* Separate the key setting code in the constructor of HMAC class into the Initwtc@chromium.org2009-05-055-22/+100
| | | | | | | | | | | | | | | | | | method. Overload the Init method for char* and std::string. Add DCHECKs to the destruction methods in ~HMAC in hmac_win.cc. The patch is written by Takeshi Yoshino <tyoshino@google.com>. Original code review: http://codereview.chromium.org/88062 R=wtc http://crbug.com/2297 TEST=base_unittests should pass. Safe browsing should continue to work. Review URL: http://codereview.chromium.org/113001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15353 0039d316-1c4b-4281-b951-d872f2087c98
* Fix hang in DirectoryWatcherTest.WatchCreatedDirectory on Windows.phajdan.jr@chromium.org2009-05-051-2/+4
| | | | | | | | TBR=evan Review URL: http://codereview.chromium.org/109008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15288 0039d316-1c4b-4281-b951-d872f2087c98
* Add more tests for recursive DirectoryWatcher watches.phajdan.jr@chromium.org2009-05-051-30/+114
| | | | | | Review URL: http://codereview.chromium.org/100346 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15283 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_vector.h and stl_util-inl.h to base/ben@chromium.org2009-05-053-0/+504
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15272 0039d316-1c4b-4281-b951-d872f2087c98
* 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