summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Coalesce damage rects that share an edge.darin@chromium.org2009-12-073-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | This fixes the Bloat HTTP page cycler regression, and allows me to remove the hack I checked in to disable multiple-paints due to an observed DHTML page cycler regression. I added a new histogram, RW_IntermediatePaintRectCount, that would have shown the problem clearly had it been there before. I included some cleanup in PaintAggregator: 1- rename "r" to "existing_rect" for clarity 2- check for contained (i.e., redundant) invalidates up front I also changed the opacity of the paint rects used when --show-paint-rects is specified. I find myself dogfooding with this command line option enabled, and I want it to be a little less annoying but still just as useful. R=brettw BUG=29477 TEST=none Review URL: http://codereview.chromium.org/464057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33949 0039d316-1c4b-4281-b951-d872f2087c98
* Add an implementation of base::SyncSocket::Peek for posix platforms. Alsosehr@google.com2009-12-061-3/+7
| | | | | | | | | update the unit test to test the result. TEST=ipc_tests/sync_socket_unittest.cc Review URL: http://codereview.chromium.org/468023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33944 0039d316-1c4b-4281-b951-d872f2087c98
* Use factory to create histograms, and refcounts to track lifetimesjar@chromium.org2009-12-065-232/+485
| | | | | | | | | | | | | | | This is CL patch 377028 by Raman Tenneti, with minor changes to make the try-bots happier. It is cleanup that better ensures lifetimes of histograms (making it harder for users to abuse them). bug=16495 (repairs leak induced by the first landing) bug=18840 (should make leaks less possible) tbr=raman.tenneti Review URL: http://codereview.chromium.org/462027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33933 0039d316-1c4b-4281-b951-d872f2087c98
* Add non-blocking peek for the syncsocketcpu@chromium.org2009-12-043-0/+18
| | | | | | | | | | | | - Windows only BUG=none TEST=unit test included Review URL: http://codereview.chromium.org/464020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33876 0039d316-1c4b-4281-b951-d872f2087c98
* Split base.gyp and add base_nacl_win64 targetgregoryd@google.com2009-12-043-536/+613
| | | | | | | | | | TEST=none BUG=28176 Review URL: http://codereview.chromium.org/462009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33872 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid including gtk & glib headers in message_pump_glib.h, saves 1 sec on ↵mattm@chromium.org2009-12-042-10/+18
| | | | | | | | | | | do-nothing make. TEST=manual browser test, trybots BUG=none Review URL: http://codereview.chromium.org/464031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33851 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for 64-bit Windows build: base and chrome/appgregoryd@google.com2009-12-041-1/+3
| | | | | | | | | | | This is required to support Native Client on 64-bit Windows. Native Client will use a small 64-bit executable to load NaCl modules on 64-bit Windows. This 64-bit executable will use Chrome code, but some functionality has to be removed to minimize dependencies. This functionality may be enabled later if we decide that it is necessary. TEST=None BUG=28176 Review URL: http://codereview.chromium.org/371073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33823 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to the string MatchPattern functions:tony@chromium.org2009-12-033-26/+32
| | | | | | | | | | | | | | | 1) Make it explicit that it only supports ASCII (since it iterates character by character). 2) Limit the recursion to 16 levels. We could allow more, but in the case of a ?, it has exponential complexity, so I figured 16 was a good stopping point. It seems rare that someone would have more than 16 '?' and '*'s. BUG=28645 Review URL: http://codereview.chromium.org/460047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33748 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DCHECK that thinks fd = 0 is invalid.thestig@chromium.org2009-12-031-1/+1
| | | | | | | | BUG=25762 TEST=none Review URL: http://codereview.chromium.org/466023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33725 0039d316-1c4b-4281-b951-d872f2087c98
* Rename AtomicFlag to CancelFlag, change its semantics a bittimurrrr@chromium.org2009-12-037-147/+141
| | | | | | Review URL: http://codereview.chromium.org/454025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33723 0039d316-1c4b-4281-b951-d872f2087c98
* Make no-tcmalloc (really, non-base/allocator) builds work again,dank@chromium.org2009-12-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (i.e. this is a plain vanilla build used when layers like base/allocator are getting in the way of debugging) and make sure they use msvcrt rather than libcmt (libcmt is used to help shim malloc/free, but it gets in the way of valgrind doing the same thing). Sadly, this is now a gyp-time operation rather than a Configuration option. Had to remove hardcoded C prototype for _set_new_mode, as that caused link errors. Also add variables win_{release,debug}_{Optimization,RuntimeLibrary} to let the valgrind build override those settings. Fix calling convention on _set_new_mode to match the one in <new.h> BUG=none TEST=build with ~/.gyp/include.gypi set as described in comment in common.gypi, gclient runhooks, do release build, verify all exe's and dll's linked against msvcrt dll Review URL: http://codereview.chromium.org/455037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33719 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for 64-bit Windows buildgregoryd@google.com2009-12-032-4/+4
| | | | | | | | | BUG=28176 TEST=none Review URL: http://codereview.chromium.org/455036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33645 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Rename DIR_CACHE to DIR_USER_CACHE, which is already used on Linux.thestig@chromium.org2009-12-033-4/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/463005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33642 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce number of iterations on TimeTicks.Deltas testmbelshe@google.com2009-12-031-1/+1
| | | | | | | | | | | so that unittests run faster. BUG=22061 TEST=this is the test Review URL: http://codereview.chromium.org/462010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33631 0039d316-1c4b-4281-b951-d872f2087c98
* Annotate a test-only data race on booleantimurrrr@chromium.org2009-12-021-0/+3
| | | | | | | | | We had a suppression for this race, but it couldn't hide the race in some rare cases like http://build.chromium.org/buildbot/waterfall/builders/Linux Tests (tsan)/builds/1213/steps/valgrind test%3A base/logs/stdio when the order of the racing accesses was different. Review URL: http://codereview.chromium.org/466009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33603 0039d316-1c4b-4281-b951-d872f2087c98
* Move some XDG code from chrome to base, make DIR_USER_CACHE generic rather ↵thestig@chromium.org2009-12-029-3/+346
| | | | | | | | | | than Chromium specific, and clean up a few headers. BUG=none TEST=none Review URL: http://codereview.chromium.org/449048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33565 0039d316-1c4b-4281-b951-d872f2087c98
* Tries to catch callbacks expecting scoped_refptr<T> and getting T* using ↵jamesr@chromium.org2009-12-023-1/+182
| | | | | | | | template magic Review URL: http://codereview.chromium.org/414024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33531 0039d316-1c4b-4281-b951-d872f2087c98
* Flush logging output.derat@chromium.org2009-12-021-11/+18
| | | | | | | | | | | It gets buffered otherwise, which is inconvenient when trying to follow what's going on in the Chrome OS window manager. TEST=compiled and ran it Review URL: http://codereview.chromium.org/459001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33520 0039d316-1c4b-4281-b951-d872f2087c98
* Remove emtpy lists and empty dictionaries from Preferences andtony@chromium.org2009-12-023-42/+181
| | | | | | | | | | Local State when writing to disk. BUG=28836 Review URL: http://codereview.chromium.org/449074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33518 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the deprecated version of ContentsEqual.thakis@chromium.org2009-12-013-9/+3
| | | | | | | | | | BUG=24672 TEST=base_unittests Review URL: http://codereview.chromium.org/432001 Patch from tfarina. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33483 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the unnecessary workaround for NSS bug 455424, now that we requirewtc@chromium.org2009-12-013-13/+0
| | | | | | | | | | | NSS 3.12.3 or later. R=ukai BUG=none TEST=No compilation errors. Review URL: http://codereview.chromium.org/452014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33464 0039d316-1c4b-4281-b951-d872f2087c98
* Point #include lines to files in the new tcmalloc/chromium local branch.sgk@chromium.org2009-12-011-1/+1
| | | | | | | | | Add +third_party\tcmalloc to webkit\DEPS. BUG=27911 TEST=none Review URL: http://codereview.chromium.org/449016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33440 0039d316-1c4b-4281-b951-d872f2087c98
* List all of the tcmalloc src/ files so that IDE users can view everything,sgk@chromium.org2009-12-011-35/+146
| | | | | | | | | adding 'sources!' exclusions for all of the files we don't actually use. BUG=27911 TEST=none Review URL: http://codereview.chromium.org/449033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33439 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add next-protocol-negotiation to libssl.agl@chromium.org2009-11-301-0/+4
| | | | | | | | | | | | This is an experimental, client only implementation of next-protocol-negotiation: http://www.imperialviolet.org/binary/draft-agl-tls-nextprotoneg-00.html This only affects the internal copy of libssl and is only active when built with use_system_ssl=0, which is not currently the default. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33327 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak when calling the one-arg form of ListValue::Remove().pkasting@chromium.org2009-11-303-2/+13
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/434108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33314 0039d316-1c4b-4281-b951-d872f2087c98
* Fix race in directory creation on Windows. Thejoi@chromium.org2009-11-272-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | file_util::CreateDirectory() function is supposed to succeed if the directory already exists, but in the previous implementation when two processes/threads called the function at the same time for the same path, one would see a failure. Also, get rid of the use of SHCreateDirectoryEx function. For one, it is highly serializing because it calls SHChangeNotify. The race was actually easy to reproduce by starting two instances of Chrome both at the same time, with a profile directory flag indicating a profile directory that did not previously exist. For another, SHCreateDirectoryEx would fail with ERROR_CANCELLED if any of the path components were not visible, according to its MSDN documentation. BUG=none TEST=[base_unittests.exe --gtest_filter=*CreateDirectory* ], and/or install Chrome Frame on a fresh machine and make sure the first page you navigate to has two Chrome Frame instances on it - you should get no DCHECK on failure of PathService::Override Review URL: http://codereview.chromium.org/437090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33225 0039d316-1c4b-4281-b951-d872f2087c98
* Make SystemMonitor not a Singleton and move it out of basephajdan.jr@chromium.org2009-11-269-461/+19
| | | | | | | | | | | | | SystemMonitor makes an assumption that through its lifetime a MessageLoop exists and stays the same. It is difficult and error-prone to satisfy that when it is a Singleton. It has caused problems in the past. Additionally, extract HighResoltionTimerManager out of time_win.cc, eliminating yet another Singleton. TEST=none BUG=none Review URL: http://codereview.chromium.org/431008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33214 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the existing .gyp configuration to use the new base\allocatorsgk@chromium.org2009-11-262-2/+13
| | | | | | | | | | library with upstream source code from the new vendor branch patterns in third_party\jemalloc and third_party\tcmalloc. BUG=27911 TEST=none Review URL: http://codereview.chromium.org/435040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33208 0039d316-1c4b-4281-b951-d872f2087c98
* For now, let's clear local storage whenever we clear cookies.jorlow@chromium.org2009-11-263-0/+16
| | | | | | | | BUG=28788 TEST="Clear private data..." from the menu, check cookies, and tell it ok. Data in "Local Storage" inside the profile's data dir should be deleted and any open websites that were using that data should no longer be able to see it. Review URL: http://codereview.chromium.org/441012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33162 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SyncSocket class for Posix targets (Linux, Mac), and enable thesehr@google.com2009-11-262-0/+102
| | | | | | | | | | | corresponding unittest. This feature, as a reminder, allows low-latency (blocking) send/receive between processes, and will be used for real-time thread synchronization for Pepper audio and for direct synchronization for 3D video. Review URL: http://codereview.chromium.org/431043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33161 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor OS-dependent filename exclusion patternsevan@chromium.org2009-11-261-34/+1
| | | | | | | | | | | | | Rather than duplicate logic in the tree, merge all of the shared rules about patterns in filenames into one common set. The pattern is: "if (OS != x): exclude x's files." This is especially needed for upcoming changes that bring in a few more platform-specific (FreeBSD, OpenBSD, Solaris(?)) files. Review URL: http://codereview.chromium.org/443011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33160 0039d316-1c4b-4281-b951-d872f2087c98
* file_util: Remove deprecated function SetCurrentDirectory.thestig@chromium.org2009-11-252-5/+0
| | | | | | | | | | | BUG=24672 TEST=None Original Review URL: http://codereview.chromium.org/391059 Patch from Thiago Farina <thiago.farina@gmail.com>. Review URL: http://codereview.chromium.org/434093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33135 0039d316-1c4b-4281-b951-d872f2087c98
* Properly detect KDE4 on newer systems (e.g. [K]Ubuntu 9.04).mdm@chromium.org2009-11-251-1/+6
| | | | | | | | BUG=25938 TEST=try to configure proxy settings on KDE4 when $DESKTOP_SESSION=kde, it should work Review URL: http://codereview.chromium.org/427013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33132 0039d316-1c4b-4281-b951-d872f2087c98
* Make the eviction function faster by reading/writing 1MB blocksnsylvain@chromium.org2009-11-251-26/+25
| | | | | | | instead of 4k. Review URL: http://codereview.chromium.org/442011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33129 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix spurious gcc warning.pkasting@chromium.org2009-11-251-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33112 0039d316-1c4b-4281-b951-d872f2087c98
* Many changes to DictionaryValues:pkasting@chromium.org2009-11-257-122/+269
| | | | | | | | | | | | | | | | | * Add support for keys with "." in them via new XXXWithoutPathExpansion() APIs. * Use these APIs with all key iterator usage. * SetXXX() calls cannot fail, so change them from bool to void. * Change GetSize() to size() since it's cheap, and add empty(). Other: * Use standard for loop format in more places (e.g. instead of while loops when they're really doing a for loop). * Shorten a few bits of code. BUG=567 TEST=none Review URL: http://codereview.chromium.org/441008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33109 0039d316-1c4b-4281-b951-d872f2087c98
* Merge r33049 (symbolize_linux.cc) to new allocator structure.sgk@chromium.org2009-11-251-1/+3
| | | | | | | BUG=27911 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33074 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate the base logging with Event Tracing for Windows. This allows ETW ↵siggi@chromium.org2009-11-2513-0/+1610
| | | | | | | | | | | to control the log level and log feature flags from outside the process, and all log messages can be transported into ETW trace sessions.As is this provides an event trace provider class thatmanages the log level on control callbacks and shunts the formatted log messages to ETW when warranted.The provider observes one feature flag, which when turned on causes it to capture and log a stack trace at the log site, which can be helpful when diagnosing errors from logs.This CL also initializes ETW logging for chrome.dll, but only if the environment variable "CHROME_ETW_LOGGING" is set. The ETW machinery may create a thread in every process registering a trace provider, and the environment variable makes this overhead optional. TEST=Unittests in this change BUG=none Review URL: http://codereview.chromium.org/413006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33066 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore UTF-8's BOM when parsing userscript's metadata.hayato@chromium.org2009-11-252-0/+4
| | | | | | | | | BUG=27333 TEST=UserScriptTest and check the issue does not happen against userscipt encoded in UTF-8 with BOM.. Review URL: http://codereview.chromium.org/420001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33048 0039d316-1c4b-4281-b951-d872f2087c98
* Branch new tcmalloc_linux.cc into new chromium\src branch. Update newsgk@chromium.org2009-11-251-0/+4
| | | | | | | | | base\allocator\allocator.gyp with merged changes from tcmalloc.gyp. BUG=27911 TEST=none Review URL: http://codereview.chromium.org/432021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33047 0039d316-1c4b-4281-b951-d872f2087c98
* Branch the files in the shim layer that switches between thesgk@chromium.org2009-11-258-0/+1340
| | | | | | | | | | memory allocation implementations (tcmalloc, jemalloc, etc.) into a base\allocator library. BUG=27911 TEST=none Review URL: http://codereview.chromium.org/434067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33043 0039d316-1c4b-4281-b951-d872f2087c98
* Enable TCMalloc on Linux by default.willchan@chromium.org2009-11-254-31/+26
| | | | | | | | | | 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
* Make calloc return NULL while initializing.vandebo@chromium.org2009-11-241-18/+37
| | | | | | | | | BUG=28244 TEST=Run chrome in shared library mode Review URL: http://codereview.chromium.org/431025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32953 0039d316-1c4b-4281-b951-d872f2087c98
* This adds the first version of SyncSocket to base, along with a trivial ↵sehr@google.com2009-11-243-0/+212
| | | | | | | | | | unittest. SyncSocket provides a blocking send/receive that can be used for synchronization. Review URL: http://codereview.chromium.org/418004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32927 0039d316-1c4b-4281-b951-d872f2087c98
* Move base64 from 'net/base' into 'base'.hayato@chromium.org2009-11-245-0/+99
| | | | | | | | | BUG=13572 TEST=none Review URL: http://codereview.chromium.org/399068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32918 0039d316-1c4b-4281-b951-d872f2087c98
* posix: split OS-specific bits out of sys_info_posixevan@chromium.org2009-11-235-50/+104
| | | | | | | | Split into Linux and BSD-specific files. Review URL: http://codereview.chromium.org/427010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32860 0039d316-1c4b-4281-b951-d872f2087c98
* Fix environment variables not being used after switching to ↵jam@chromium.org2009-11-232-7/+8
| | | | | | | | | | ChildProcessLauncher. BUG=28602 TEST=verified flash works on Mac Review URL: http://codereview.chromium.org/439005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32854 0039d316-1c4b-4281-b951-d872f2087c98
* Notify race detectors (e.g. ThreadSanitizer) about the thread namestimurrrr@chromium.org2009-11-231-0/+2
| | | | | | | | | ThreadSanitizer will print the name of the threads in data race reports. ANNOTATE_THREAD_NAME is a no-op in Release non-valgrind build Review URL: http://codereview.chromium.org/434009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32821 0039d316-1c4b-4281-b951-d872f2087c98
* posix: refactor duplicated path-handling codeevan@chromium.org2009-11-217-64/+27
| | | | | | | | | We had the same code in three headers, and an "if FREEBSD" in a _linux.cc file. Review URL: http://codereview.chromium.org/414063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32722 0039d316-1c4b-4281-b951-d872f2087c98