summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Linux: refactor zygote supportagl@chromium.org2009-06-1014-1074/+246
| | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxZygote * Move Chrome specific bits out of base * Move away from the idea of reserved file descriptors (which don't really work with zygotes) * Load resources before forking renderers (means that we don't need communication between the zygote process and the renderers) * Make sure that gdb works against the browser again * Make sure that we have different ASLR between the renderers and the browser. http://codereview.chromium.org/119335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18109 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: read subprocess output before waiting for termination.agl@chromium.org2009-06-101-8/+7
| | | | | | | | | | | | | Previously, GetAppOutput was designed only for fuser. However, it appears that Mac is using it to read the output of ps: which outputs rather more. In this case, ps can fill up the pipe buffer while we are waiting for it to exit, leading to deadlock depending on how many other process are running on the system at the time. http://codereview.chromium.org/118514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18068 0039d316-1c4b-4281-b951-d872f2087c98
* Liberalize the size limits in the PNG decoder to match the changes landed ↵pkasting@chromium.org2009-06-091-5/+7
| | | | | | | | | | upstream to all the WebKit image decoders. I'm not sure where this is used, hence no test. BUG=3643 TEST=none Review URL: http://codereview.chromium.org/118462 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17988 0039d316-1c4b-4281-b951-d872f2087c98
* Add a stack-based class for property disabling and re-enabling screen ↵pinkerton@chromium.org2009-06-092-0/+36
| | | | | | | | | | updating without epic fail. Fixes issues where we weren't re-enabling updates in many cases which caused both jank and resize issues. BUG=13476 TEST=closing windows shouldn't have jank regardless of the # of tabs. Resizing a window shouldn't explode visually in the chrome. Review URL: http://codereview.chromium.org/119363 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17956 0039d316-1c4b-4281-b951-d872f2087c98
* Make zygote mode not be the default; it screws with the valgrind bots,dkegel@google.com2009-06-091-1/+1
| | | | | | | | | | | | | | and there's a "double free or corruption" on atexit that we need valgrind for. To reenable, set ENABLE_ZYGOTE_MANAGER=1. It's going to be refactored anyway... BUG=none TEST=none Review URL: http://codereview.chromium.org/118440 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17954 0039d316-1c4b-4281-b951-d872f2087c98
* Include a parent directory link in the file list for file:///somepathyuzo@chromium.org2009-06-095-19/+126
| | | | | | | | | | | | | | | Also, order files/directories lexicographically. TEST=on linux, type file:///usr/ in the address bar and make sure the contents are sorted and include an entry for '..', which is [parent directory]. On windows, type file:///C:/Users/ . BUG=12621, 12812 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17933 0039d316-1c4b-4281-b951-d872f2087c98
* Enable zygote manager by default.dkegel@google.com2009-06-087-18/+86
| | | | | | | | | | | | | | Fix broken recursion check. Make OpenFile warning less scary, indicate it's normal at start of ui tests. Make ui tests pass. Avoid generating extra code on Mac. BUG=11841 TEST=start the browser, then make chrome and all .pak files unreadable; or alternately, start an installed browser, and uninstall the browser while it's running. Then create a new tab and browse to two new sites. Review URL: http://codereview.chromium.org/119289 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17909 0039d316-1c4b-4281-b951-d872f2087c98
* A new menu system for views.ben@chromium.org2009-06-081-0/+3
| | | | | | | | This is all the functionality needed for the page, app menus and browser system menus. Review URL: http://codereview.chromium.org/119237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17895 0039d316-1c4b-4281-b951-d872f2087c98
* Crash in a CHECK if we fail to load a data pack file. Running w/o ourtc@google.com2009-06-081-2/+4
| | | | | | | | | | | resources is crazy talk. We've had 20 crashes here from 7 users, hopefully this will gives us some more info. Review URL: http://codereview.chromium.org/118326 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17869 0039d316-1c4b-4281-b951-d872f2087c98
* CloseSuperfluousFiles shouldn't close the directory it's reading fromdkegel@google.com2009-06-071-0/+3
| | | | | | | | | BUG=none TEST=none (found with strace while running e.g. ProcessUtilTest.FDRemapping) Review URL: http://codereview.chromium.org/115720 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17847 0039d316-1c4b-4281-b951-d872f2087c98
* Prototype implementation of zygotes. dkegel@google.com2009-06-0613-6/+1375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limitations that need addressing still: - Doesn't forcibly terminate children that should have exited but haven't Enable with env var ENABLE_ZYGOTE_MANAGER=1. BUG=11841 TEST= start the browser, then make chrome and all .pak files unreadable; or alternately, start an installed browser, and uninstall the browser while it's running. Then create a new tab and browse to two new sites. Here's an example script to hide and unhide the .pak files (note: do not move the directory they're in, that doesn't work): #!/bin/sh chmod_all() { chmod $1 sconsbuild/Debug/chrome for path in . locales obj/chrome/app/intermediate/repack obj/global_intermediate/* themes do chmod $1 sconsbuild/Debug/$path/*.pak done } case $1 in hide) chmod_all 000 ;; show) chmod_all 755 ;; esac Review URL: http://codereview.chromium.org/115773 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17840 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug in SignatureCreator and add some more tests.aa@chromium.org2009-06-063-12/+98
| | | | | | Review URL: http://codereview.chromium.org/119277 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17824 0039d316-1c4b-4281-b951-d872f2087c98
* Re-Retry. This is the change from hell.glen@chromium.org2009-06-061-5/+34
| | | | | | | | | | | | | | | | | | | | | | | Revert DCHECKs to what they used to be - turns out a bunch of stuff in the code depended on input.empty() == true. --- I believe the code (with your width() * bbp fix) is correct. The UMR errors occur when the source image contain alpha. I believe the issue comes from webkit glue image decoder, and the reason this only started triggering valgrind errors is that the old ones were masked by the change detailed in bug 12640 Also adds valgrind suppression for the new code. TBR=Nick BUG=12891,12640 TEST=none Review URL: http://codereview.chromium.org/119271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17811 0039d316-1c4b-4281-b951-d872f2087c98
* Revert pngencoder changes.glen@chromium.org2009-06-051-36/+5
| | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17803 0039d316-1c4b-4281-b951-d872f2087c98
* Fix pngencoder mac perf errors - the previous code was never actually doing ↵glen@chromium.org2009-06-051-4/+3
| | | | | | | | | | | | an input.empty() check. BUG=none TEST=none TBR=nick Review URL: http://codereview.chromium.org/118343 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17801 0039d316-1c4b-4281-b951-d872f2087c98
* Retry. I believe the code (with your width() * bbp fix) is correct.glen@chromium.org2009-06-051-5/+37
| | | | | | | | | | | | | The UMR errors occur when the source image contain alpha. I believe the issue comes from webkit glue image decoder, and the reason this only started triggering valgrind errors is that the old ones were masked by the change detailed in bug 12640 Also adds valgrind suppression for the new code. BUG=12891,12640 TEST=none Review URL: http://codereview.chromium.org/118297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17792 0039d316-1c4b-4281-b951-d872f2087c98
* Porting the browser tests to Unix.jcampan@chromium.org2009-06-055-12/+79
| | | | | | | | | | | | | The browser tests are an alternative to UI tests. They provide a way to exercise the browser from within the test (without having the test and the browser running in different processes). In order to ensure atexit hanlders are run after each tests and static initializers start fresh for each test, each test is run in a new process (on Linux and Mac). On Windows, a DLL containing the test is loaded/unloaded for each tests. BUG=None TEST=Run the browser tests. Review URL: http://codereview.chromium.org/115896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17781 0039d316-1c4b-4281-b951-d872f2087c98
* openbsd: make platform_file_posix compileevan@chromium.org2009-06-051-1/+2
| | | | | | | | | | - switch errno from ENOTSUP to EOPNOTSUPP: Linux doesn't have ENOTSUP and errno.h just does 'define ENOTSUP EOPNOTSUPP', on BSD the alias is not available at all (despite POSIX specifying it) - pull in <sys/stat.h> for S_IRUSR defines Review URL: http://codereview.chromium.org/118295 Patch from Peter Valchev <pvalchev@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17749 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce SignatureCreator.aa@chromium.org2009-06-057-0/+726
| | | | | | Review URL: http://codereview.chromium.org/118277 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17745 0039d316-1c4b-4281-b951-d872f2087c98
* Break up unit test to avoid internal timing interactions between parts.jar@chromium.org2009-06-052-29/+33
| | | | | | | | | | | | | | | Hopefully this will cure teh flaky problem under Valgrind. I also had to re-read my own code, and so I put in to minor changes to hopefully make it incrementally easier ot read. There should be no semantic changes caused by my coding changes, but the level of nested braces is reduced, which makes it easier ot see what is (supposed to be) going on. r=dank,phajdan Review URL: http://codereview.chromium.org/42266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17698 0039d316-1c4b-4281-b951-d872f2087c98
* sysconf(_SC_NPROCESSORS_ONLN) is not available on some POSIXevan@chromium.org2009-06-051-0/+16
| | | | | | | | | systems, use sysctl(3) for OpenBSD Review URL: http://codereview.chromium.org/118289 Patch from Peter Valchev <pvalchev@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17695 0039d316-1c4b-4281-b951-d872f2087c98
* add CollapseWhitespaceASCIIrafaelw@chromium.org2009-06-043-4/+47
| | | | | | | | R=erikkay Review URL: http://codereview.chromium.org/119199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17689 0039d316-1c4b-4281-b951-d872f2087c98
* Revert png encoder changes.glen@chromium.org2009-06-041-40/+4
| | | | | | | | | BUG=none TEST=none TBR=nick git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17688 0039d316-1c4b-4281-b951-d872f2087c98
* Twiddle some bits to get PNGEncoder to match ImageOperations. There's a ↵glen@chromium.org2009-06-041-9/+16
| | | | | | | | | | | Valgrind error that doesn't yet make sense. BUG=none TEST=none TBR=willchan git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17680 0039d316-1c4b-4281-b951-d872f2087c98
* Only update files from .version templates when a file changesgk@google.com2009-06-041-11/+2
| | | | | | | | | | | | | indicates it's necessary (now that fetching the last change info is in a separate target executed every build) by getting rid of the never-built .bogus files in the rules. Update chrome/installer/installer.gyp with the new patterns. Make the use of the *_path variable names more consistent. BUG=none TEST=none Review URL: http://codereview.chromium.org/119181 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17668 0039d316-1c4b-4281-b951-d872f2087c98
* On Linux, look in $HOME/.icons for mime icons as well for backwards ↵thestig@chromium.org2009-06-041-11/+14
| | | | | | | | | | compatibility. BUG=13001 TEST=Put an icon theme in $HOME/.icons, set it as the icon theme, and make sure Chromium picks it up on the download page. (May need to restart Chromium.) Review URL: http://codereview.chromium.org/119206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17667 0039d316-1c4b-4281-b951-d872f2087c98
* Harmonizing ProcessUtil::GetAppOutput on Win/Unixjcampan@chromium.org2009-06-043-23/+13
| | | | | | | | BUG=None TEST=Run the base unit-tests Review URL: http://codereview.chromium.org/119190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17660 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to fix memory leak again.glen@chromium.org2009-06-041-1/+1
| | | | | | | | | BUG=none TEST=none TBR=willchan git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17635 0039d316-1c4b-4281-b951-d872f2087c98
* Fetch last change (revision) info in a separate action that can runsgk@google.com2009-06-041-3/+8
| | | | | | | | | | every build, instead of having it occur as a side effect of updating some other target for which we want to use normal up-to-date checks. BUG=none TEST=none Review URL: http://codereview.chromium.org/118192 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17634 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage by defining NativeCursor on Mac.ben@chromium.org2009-06-041-0/+1
| | | | | | | | | TBR=glen BUG=none TEST=none Review URL: http://codereview.chromium.org/118223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17618 0039d316-1c4b-4281-b951-d872f2087c98
* Replace HCURSOR usage in views::View with a new gfx::NativeCursor type that ↵ben@chromium.org2009-06-041-0/+3
| | | | | | | | | | | | | also supports GdkCursor*, and wires this up with the existing implementors of the GetCursorForPoint method. This allows us to get rid of one of the most annoying NOTIMPLEMENTED()s in views-gtk. BUG=none TEST=none Review URL: http://codereview.chromium.org/119150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17614 0039d316-1c4b-4281-b951-d872f2087c98
* Reland my ClientSocketPool refactor again...willchan@chromium.org2009-06-041-0/+7
| | | | | | | | | | The bug was that the handle was getting reused, so the ConnectingSocket doesn't know that it got canceled. It just keeps chugging away. I added a map to keep track of the ConnectingSockets so they can be canceled if we detect a reuse. TBR=wtc Review URL: http://codereview.chromium.org/118219 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17606 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in PNGEncoder.glen@chromium.org2009-06-041-10/+10
| | | | | | | | | | | R=willchan BUG=none TEST=none Review URL: http://codereview.chromium.org/119147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17603 0039d316-1c4b-4281-b951-d872f2087c98
* Sigh, revert "Reland my ClientSocketPool refactor."willchan@chromium.org2009-06-041-7/+0
| | | | | | | | | This reverts commit d3d93c94d040db33599b798723ac1fef560b653a. It broke document-location-click-timeout.html again =/ Review URL: http://codereview.chromium.org/119143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17591 0039d316-1c4b-4281-b951-d872f2087c98
* PNGEncoder wasn't accounting for SkBitmap's premultiplied alpha (PNGDecoder ↵glen@chromium.org2009-06-041-4/+33
| | | | | | | | | | was, however). BUG=12891 Review URL: http://codereview.chromium.org/118106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17590 0039d316-1c4b-4281-b951-d872f2087c98
* Reland my ClientSocketPool refactor.willchan@chromium.org2009-06-041-0/+7
| | | | | | | | | | | Fixed a bug where we were double compensating for active_socket_count in CancelRequest and OnIOComplete. Added ClientSocketPoolTest_TwoRequestsCancelOne to catch this. Triggered a DCHECK in debug mode before I removed the extra code in OnIOComplete. BUG=http://www.crbug.com/13289 Review URL: http://codereview.chromium.org/118172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17588 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r17575 and r17576. They are causing layout test errors.agl@chromium.org2009-06-041-5/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17577 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Add support for chrooted renderers.agl@chromium.org2009-06-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxSandboxIPC Without filesystem access from the renderers, we need another way of dealing with fontconfig and font loading. This add support for: * An "SBX_D" environment variable in the renderers which is used to signal the end of dynamic linking so that the chroot can be enforced. * A sandbox_host process, running outside the sandbox, to deal with fontconfig requests from the renderers. See the wiki page for the reasoning behind making it a separate process. * A new, custom SkFontHost for Skia. Because this is Chrome specific, it will live outside the upstream Skia tree. This FontHost can be configured either to drive fontconfig directly (for the browser process and for any unsandboxed renderers) or to use an IPC system. Since the same SkFontHost has to be linked into both the browser and renderer (they are the same binary), this switch has to be made at run time. Sandbox IPC calls are rare (a couple of dozen at page load time) and add about 50us of overhead for each call. http://codereview.chromium.org/112074 BUG=8081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17575 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the icon theme detection on Gnome; Improve icon theme heuristics for ↵thestig@google.com2009-06-031-20/+33
| | | | | | | | | | KDE. Don't let Gnome use default KDE icons themes and vice versa. BUG=13001 TEST=Download some files, make sure file icons in the download manager match / closely resemble those in Nautalus / Konqueror. Review URL: http://codereview.chromium.org/119113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17558 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder fts(3) includes per the man page, as fts.h uses sys/types.h. On ↵evan@chromium.org2009-06-031-2/+3
| | | | | | | | | linux, <sys/types.h> happened to be define before this anyway, but on other POSIX systems this is not the case. Review URL: http://codereview.chromium.org/119110 Patch from Peter Valchev <pvalchev@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17541 0039d316-1c4b-4281-b951-d872f2087c98
* Merge app/gfx/gtk_util into base/gfx/gtk_util.thestig@google.com2009-06-032-0/+37
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/118174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17535 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Windows compile.phajdan.jr@chromium.org2009-06-031-0/+1
| | | | | | | | TBR=maruel Review URL: http://codereview.chromium.org/119083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17480 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in base/phajdan.jr@chromium.org2009-06-0323-21/+50
| | | | | | | | Also adds more explicit #includes for needed things. Review URL: http://codereview.chromium.org/118162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17479 0039d316-1c4b-4281-b951-d872f2087c98
* Removes the following deprecated functions:ojan@chromium.org2009-06-032-28/+0
| | | | | | | | | | | | | | | | file_util::InsertBeforeExtension(wstring*, wstring&) file_util::PathComponents(wstring&, vector<wstring>*) file_util::ReplaceExtension(wstring*, wstring&) BUG=none TEST=manual test for importing IE bookmarks with some sub-directories. Original patch by tkent@google.com. See http://codereview.chromium.org/118109 r=ojan,estade git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17469 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix main loop issues with windowless pluginsevan@chromium.org2009-06-012-43/+99
| | | | | | | | | | | | | | | | | | In certain conditions (e.g. NPN_InvalidateRect taking long), the flash plugin runs its own event loop before returning. It looks roughly like this: while (gtk_events_pending()) { gtk_main_iteration(); } The problem is that our worker source used to force gtk_events_pending() to be always true, because the Check handler always returned TRUE (and that also made HandleDispatch to always run). That caused flash animations to stop and other bad behavior (100% CPU). This CL changes the Check function to return TRUE only if HandleDispatch should be run (i.e., more_work_is_plausible set to true), while also checking whether the loop was woken up, or the delayed work timer expired. HandlePrepare was forcing more_work_is_plausible to be always true apparently to avoid starvation. I removed this, I'm not sure why it is needed. If we get starvation issue, we should raise the priority of WorkSource (for reference, most events run at prio 0, except redraws that run at prio 120. WorkSource runs at prio 200). Another possibility is to force more_work_is_plausible but only every n calls to HandlePrepare. BUG=8202,11843,12278 Review URL: http://codereview.chromium.org/115812 Patch from Antoine Labour <piman@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17357 0039d316-1c4b-4281-b951-d872f2087c98
* Moved bug to external tracker.maruel@chromium.org2009-06-011-6/+6
| | | | | | | TBR=nsylvain Review URL: http://codereview.chromium.org/118085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17347 0039d316-1c4b-4281-b951-d872f2087c98
* Tweak SVNVersion be happier (matches windows).jrg@chromium.org2009-06-011-1/+5
| | | | | | | | | | | | Fix about:version so "Developer build" says "Official build" when relevant, and lists SVN version for developer builds. BUG=12064 Review URL: http://codereview.chromium.org/118036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17337 0039d316-1c4b-4281-b951-d872f2087c98
* Fix msvs_guid for gmock and re-add gmock_unittest into base_unittest.ajwong@chromium.org2009-05-301-1/+1
| | | | | | | | | | | | The issue is that if there are lower case characters in the msvs_guid, incredibuild will silently ignore the target during a _command-line_ build. This issue does not affect builds in visual studio (incredibuild-based, or regular), but it does break the build bots. Review URL: http://codereview.chromium.org/118013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17287 0039d316-1c4b-4281-b951-d872f2087c98
* Move a few functions commonly called with char* to StringPiece.deanm@chromium.org2009-05-294-9/+10
| | | | | | | | | | | In some cases this will avoid the implicit char* -> std::string conversion, object creation, and string copying. One of the biggest benefit is on Windows, where we can save some conversions in FilePath::AppendASCII. Review URL: http://codereview.chromium.org/113996 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17182 0039d316-1c4b-4281-b951-d872f2087c98
* Removing gmock from build since it has unresolvned xternsjar@chromium.org2009-05-281-1/+1
| | | | | | | | | Repairing tree bustage. r=jrg Review URL: http://codereview.chromium.org/113975 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17129 0039d316-1c4b-4281-b951-d872f2087c98