summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Automatically adapt to faster/slower uploads of renderer histogramsjar@chromium.org2009-05-282-13/+1
| | | | | | | | | | | | | | | | | | | | | This replaces the current time based approach (chrome is given N seconds to upload all renederer histograms) with an asynch callback approach that waits until all renderers have responded (with their updates). It uses a fall-back timer to ensure that a hung renderer won't delay things forever as well. This causes faster (and complete) updates in about:histograms as well as generally assuring complete updates during UMA gatherings. This code was contributed by Raman Tenneti in CL 42496 http://codereview.chromium.org/42496 bug=12850 r=raman Review URL: http://codereview.chromium.org/113473 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17123 0039d316-1c4b-4281-b951-d872f2087c98
* Implement X509Certificate::Verify for Linux.ukai@chromium.org2009-05-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Use CERT_PKIXVerifyCert() with CRL to verify certificate. With OCSP, CERT_PKIXVerifyCert() failed with SEC_ERROR_INVALID_ARGS. Increase stack size. It was not enough size if we use CERT_PKIXVerifyCert() on some sites. For example, https://www.google.com/ works, but https://bugs.webkit.org/ or https://www.thawte.com/ would die by SIGSEGV. This is because pkix_List_Destroy() routine destroys PKIX_List recursively, so if there are some long PKIX_Lists, it consumes stack a lot and dies by stack overflow. Note that X509Certificate::Verify isn't used in SSLClientSocketNSS yet. BUG=10911 TEST=net_unittests passes Review URL: http://codereview.chromium.org/113578 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17071 0039d316-1c4b-4281-b951-d872f2087c98
* Readd the gmock unittest example from the build as it causes link errors in ↵ajwong@chromium.org2009-05-281-0/+2
| | | | | | | | | | | | XP Modules. Learned how to do a clobber build so retrying with that. Hope springs eternal. Original Review URL: http://codereview.chromium.org/113807 Review URL: http://codereview.chromium.org/113938 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17068 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the gmock unittest example from the build as it causes link errors in ↵ajwong@chromium.org2009-05-281-2/+0
| | | | | | | | XP Modules. Review URL: http://codereview.chromium.org/115854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17067 0039d316-1c4b-4281-b951-d872f2087c98
* Retry to checkin a version of gmock, modified to use our boost_tuple in VS2005.ajwong@chromium.org2009-05-282-5/+144
| | | | | | | | | | This checkin adds gmock, and a small example of how to write a gmock-based unittest. Original Review URL: http://codereview.chromium.org/113807 Review URL: http://codereview.chromium.org/115846 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17066 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable SystemMonitor.* in base_unittests.phajdan.jr@chromium.org2009-05-271-2/+1
| | | | | | | | | | | | | It was disabled in http://src.chromium.org/viewvc/chrome?view=rev&revision=16308 The root cause of crash has been fixed (see linked bug). TEST=none http://crbug.com/12187 Review URL: http://codereview.chromium.org/115782 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16977 0039d316-1c4b-4281-b951-d872f2087c98
* Do not monitor system power state during unit tests.phajdan.jr@chromium.org2009-05-273-32/+90
| | | | | | | | | | | | | The observer requires that message loop stays up and same through its lifetime. This is not true during testing. TEST=none http://crbug.com/12187 Review URL: http://codereview.chromium.org/113824 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16976 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Checkin a version of gmock, modified to use our boost_tuple in VS2005."ajwong@chromium.org2009-05-262-144/+5
| | | | | | This reverts commit 071e95bcdcefcd2cb86c9aed5cb073bbcaa7f2a7. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16931 0039d316-1c4b-4281-b951-d872f2087c98
* Checkin a version of gmock, modified to use our boost_tuple in VS2005.ajwong@chromium.org2009-05-262-5/+144
| | | | | | | | This checkin adds gmock, and a small example of how to write a gmock-based unittest. Review URL: http://codereview.chromium.org/113807 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16927 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize NSS with databases.ukai@chromium.org2009-05-251-3/+29
| | | | | | | | | BUG=12348 TEST=rm -rf ~/.pki/nssdb; visit https://bugs.webkit.org/ then ~/.pki/nssdb is created. Review URL: http://codereview.chromium.org/115626 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16845 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Temporarily landing my ClientSocketPool refactor. Will revert right ↵willchan@chromium.org2009-05-221-7/+0
| | | | | | | | after." Review URL: http://codereview.chromium.org/113760 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16732 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily landing my ClientSocketPool refactor. Will revert right after.willchan@chromium.org2009-05-221-0/+7
| | | | | | Review URL: http://codereview.chromium.org/113759 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16731 0039d316-1c4b-4281-b951-d872f2087c98
* Fix /SUBSYSTEM:WINDOWS setting left out of previous CL.sgk@google.com2009-05-221-0/+5
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/113753 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16712 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up more of extension uninstall.aa@chromium.org2009-05-211-1/+1
| | | | | | | | | | | Also removed all external dependencies from ExtensionsService. It now only sends out notifications, which other services consume. This should allow us to unit test the ExtensionsService frontend, but I haven't added that yet. Review URL: http://codereview.chromium.org/113493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16676 0039d316-1c4b-4281-b951-d872f2087c98
* Implement temporary First Run Dialog on OS Xjeremy@chromium.org2009-05-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | We use a modal dialog with a single checkbox on OS X. We use the OSX defaults system since we want something quick and reliable. The dialog is displayed at a very early stage in Chrome startup (Before any subsystems start relying on the stats variable). This means there are a few quirks in displaying the UI. A change was also needed to our event handling code since when the dialog is shown we spin an event loop at a very early stage in the process lifetime. Changed default value for stats to false and updated unit tests to reflect that. Also some misc. minor cleanup. BUG=11971,12046 Review URL: http://codereview.chromium.org/115608 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16669 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Hook up more of extension uninstall."aa@chromium.org2009-05-211-1/+1
| | | | | | | | This reverts commit ebb5f616663f9d5ee78584187da16bba4ce96811. Review URL: http://codereview.chromium.org/113680 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16557 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up more of extension uninstall.aa@chromium.org2009-05-201-1/+1
| | | | | | | | | | | Also removed all external dependencies from ExtensionsService. It now only sends out notifications, which other services consume. This should allow us to unit test the ExtensionsService frontend, but I haven't added that yet. Review URL: http://codereview.chromium.org/113493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16547 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: Revert "Hook up more of extension uninstall."aa@chromium.org2009-05-201-1/+1
| | | | | | | | This reverts commit 5b2fc12fbca26b20ed4176ac740c58fe49360c4a. Review URL: http://codereview.chromium.org/113664 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16538 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up more of extension uninstall.aa@chromium.org2009-05-201-1/+1
| | | | | | | | | | | Also removed all external dependencies from ExtensionsService. It now only sends out notifications, which other services consume. This should allow us to unit test the ExtensionsService frontend, but I haven't added that yet. Review URL: http://codereview.chromium.org/113493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16529 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent an extra copy of data types that get passed into IPC messages whenmpcomplete@google.com2009-05-201-0/+29
| | | | | | | | | | sending them. This makes it so that types sendable via IPC no longer need copy constructors. BUG=12296 Review URL: http://codereview.chromium.org/112042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16497 0039d316-1c4b-4281-b951-d872f2087c98