summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* "Port" StackTrace to Macmark@chromium.org2009-01-163-31/+8
| | | | | | Review URL: http://codereview.chromium.org/18173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8229 0039d316-1c4b-4281-b951-d872f2087c98
* Mac build fixagl@chromium.org2009-01-161-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/18332 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8222 0039d316-1c4b-4281-b951-d872f2087c98
* Windows build fix: sorry, I commit from the wrong tree.agl@chromium.org2009-01-161-0/+1
| | | | | | | Review URL: http://codereview.chromium.org/16611 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8221 0039d316-1c4b-4281-b951-d872f2087c98
* Add StackTrace debugging utility class.agl@chromium.org2009-01-163-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the moment, it only works on Linux, although it should be pretty easy to get it working on Mac with __builtin_return_address and __builtin_frame_address. It will mostly fail to resolve functions. Use this wrapper script: import os import sys import subprocess import re address = re.compile('.*\[(0x[0-9a-fA-F]{4,8})\].*') if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr = subprocess.STDOUT, stdout = subprocess.PIPE) addr2line = subprocess.Popen(['addr2line', '-e', sys.argv[1], '-f', '-C', '-s'], stdout = subprocess.PIPE, stdin = subprocess.PIPE) for line in p.stdout.readlines(): m = address.match(line); if m is not None: addr2line.stdin.write(m.groups()[0] + '\n') function = addr2line.stdout.readline()[:-1] location = addr2line.stdout.readline()[:-1] sys.stdout.write('%s (%s)\n' % (function, location)) else: sys.stdout.write(line) Review URL: http://codereview.chromium.org/18303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8218 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 8180.maruel@chromium.org2009-01-163-11/+1
| | | | | | Review URL: http://codereview.chromium.org/18319 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8186 0039d316-1c4b-4281-b951-d872f2087c98
* Add thread safety checks but keep them disabled for now until I fix all the ↵maruel@chromium.org2009-01-163-1/+11
| | | | | | | | | | | current places where it triggers. Set back StoreRef as non-thread-safe. BUG5689 Review URL: http://codereview.chromium.org/18272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8180 0039d316-1c4b-4281-b951-d872f2087c98
* fix filename in vcproj file (time_unittest_win.cc -> time_win_unittest.cc)tc@google.com2009-01-161-1/+1
| | | | | | | | | TBR=tommi Review URL: http://codereview.chromium.org/18135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8157 0039d316-1c4b-4281-b951-d872f2087c98
* Mac/Linux test fixes: hopefully this will fix some flakey testsagl@chromium.org2009-01-162-30/+54
| | | | | | | Review URL: http://codereview.chromium.org/18298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8143 0039d316-1c4b-4281-b951-d872f2087c98
* Back out erroneous r8140mark@chromium.org2009-01-161-4/+4
| | | | | | Review URL: http://codereview.chromium.org/18124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8141 0039d316-1c4b-4281-b951-d872f2087c98
* Fix OSX compilejeremy@chromium.org2009-01-151-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8140 0039d316-1c4b-4281-b951-d872f2087c98
* Mac build fixagl@chromium.org2009-01-152-5/+5
| | | | | | | Review URL: http://codereview.chromium.org/18122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8138 0039d316-1c4b-4281-b951-d872f2087c98
* Mac build fixagl@chromium.org2009-01-151-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/16610 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8136 0039d316-1c4b-4281-b951-d872f2087c98
* Mac build fix: xcode updatesagl@chromium.org2009-01-151-4/+8
| | | | | | | Review URL: http://codereview.chromium.org/18294 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8132 0039d316-1c4b-4281-b951-d872f2087c98
* Windows scons fix: more functions static and scons file fixagl@chromium.org2009-01-152-2/+3
| | | | | | | Review URL: http://codereview.chromium.org/18291 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8130 0039d316-1c4b-4281-b951-d872f2087c98
* Windows scons fix: forgot to rename some testsagl@chromium.org2009-01-151-4/+4
| | | | | | | Review URL: http://codereview.chromium.org/18290 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8129 0039d316-1c4b-4281-b951-d872f2087c98
* GCC on the buildbots is more pickyagl@chromium.org2009-01-151-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/18288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8128 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Build fix for WaitableEvent mergeagl@chromium.org2009-01-151-3/+3
| | | | | | | Review URL: http://codereview.chromium.org/18116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8127 0039d316-1c4b-4281-b951-d872f2087c98
* WaitableEvent is the replacement for Windows events. Previously in the code, ↵agl@chromium.org2009-01-1513-92/+1173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a HANDLE from CreateEvent was used for signaling, both within a process and across processes. WaitableEvent is the cross platform replacement for this. To convert: * HANDLE -> base::WaitableEvent* * ScopedHandle -> scoped_ptr<base::WaitableEvent> * CreateEvent -> new base::WaitableEvent * SetEvent -> base::WaitableEvent::Signal * ResetEvent -> base::WaitableEvent::Reset * ObjectWatcher -> base::WaitableEventWatcher * WaitForMultipleObjects -> static base::WaitableEvent::WaitMany ObjectWatcher remains for Windows specific code. WaitableEventWatcher has an identical interface save, * It uses WaitableEvents, not HANDLEs * It returns void from StartWatching and StopWatcher, rather than errors. System internal errors are fatal to the address space IMPORTANT: There are semantic differences between the different platforms. WaitableEvents on Windows are implemented on top of events. Windows events work across process and this is used mostly for modal dialog support. Windows events can be duplicated with DuplicateHandle. On other platforms, WaitableEvent works only within a single process. In the future we shall have to replace the current uses of cross-process events with IPCs. BEWARE: HANDLE, on Windows, is a void *. Since any pointer type coerces to void *, you can pass a WaitableEvent * where a HANDLE is expected without any build-time errors. Review URL: http://codereview.chromium.org/16554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8126 0039d316-1c4b-4281-b951-d872f2087c98
* Enhance error report info (and correct typos)jar@chromium.org2009-01-151-3/+3
| | | | | | | r=sky Review URL: http://codereview.chromium.org/18280 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8116 0039d316-1c4b-4281-b951-d872f2087c98
* Renaming the following files to include the _win suffix:tommi@chromium.org2009-01-1510-66/+50
| | | | | | | | | | | | | | | scoped_comptr*.* scoped_bstr*.* addition: time_unittest_win.cc -> time_win_unittest.cc BUG=6409 Also renaming the scoped_comptr class to ScopedComPtr to conform with chromium style (and not boost as before). Review URL: http://codereview.chromium.org/18054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8098 0039d316-1c4b-4281-b951-d872f2087c98
* add system_monitor_posix to buildpinkerton@google.com2009-01-151-0/+4
| | | | | | Review URL: http://codereview.chromium.org/18275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8097 0039d316-1c4b-4281-b951-d872f2087c98
* - Match up w/ NSPasteboard docs and mark sure our special type is on thethomasvl@chromium.org2009-01-151-1/+1
| | | | | | | pastboard type list before we put the marker. Review URL: http://codereview.chromium.org/17395 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8092 0039d316-1c4b-4281-b951-d872f2087c98
* Work around a stupid Purify bug that was causing lots of bogus messages to ↵erikkay@google.com2009-01-152-15/+19
| | | | | | | | | | | | | | | | appear when running base_unittests.exe. Also change perf_test_suite to call TestSuite::Initialize() prior to its other work to ensure that superclass initialization happens first. BUG=6436 This bug wound up being introduced with change: http://codereview.chromium.org/18003 Review URL: http://codereview.chromium.org/18074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8055 0039d316-1c4b-4281-b951-d872f2087c98
* scoped_bstr and StackBstr implementations. The scoped_bstr class is a ↵tommi@chromium.org2009-01-147-0/+332
| | | | | | | | | | | wrapper around BSTR system calls with some added functionality. StackBstr is for those times when you need to pass a fixed string to a function but visiting the heap etc to allocate a new BSTR can be avoided. StackBstr not zero cost, but much cheaper than creating a new BSTR like we currently do in many places. Review URL: http://codereview.chromium.org/18006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8011 0039d316-1c4b-4281-b951-d872f2087c98
* Report name of repeatedly registered histogramsjar@chromium.org2009-01-141-2/+6
| | | | | | | | | | | | | Histograms should ONLY be listed once in the code for a given process (the browser process?). If two or more histograms have the same name, it is an error, and a DCHECK will fire. This code will also display the name of the offending histogram. r=sky Review URL: http://codereview.chromium.org/16609 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8009 0039d316-1c4b-4281-b951-d872f2087c98
* Call logging::InitLogging. The lack of this was causing some hangs (and ↵erikkay@google.com2009-01-1310-41/+84
| | | | | | | | | | | possibly crashes) in ObserverListTest.BUG=6286 This CL has expanded to include some cleanup and refactoring of test_suite and related files, so that this logging change (and other improvements) are applied to all unit tests. Review URL: http://codereview.chromium.org/18003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7977 0039d316-1c4b-4281-b951-d872f2087c98
* Fix TODOs in base/ :phajdan.jr@chromium.org2009-01-132-8/+10
| | | | | | | | | | - switch to FilePath inside CopyDirectory - be less racy in ProcessUtilTest.KillSlowChild Review URL: http://codereview.chromium.org/17013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7948 0039d316-1c4b-4281-b951-d872f2087c98
* Port crash_cache tool to Linux.phajdan.jr@chromium.org2009-01-133-0/+40
| | | | | | Review URL: http://codereview.chromium.org/17353 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7939 0039d316-1c4b-4281-b951-d872f2087c98
* Inline the TimeDelta::From* construction functions.deanm@chromium.org2009-01-132-30/+32
| | | | | | | | | With GCC, we don't have much hope of inlining unless the defintion is in the header. This should also hopefully allow the compiler to do things like constant folding on the multiplications, etc. Review URL: http://codereview.chromium.org/17802 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7928 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a typo in a comment.deanm@chromium.org2009-01-131-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/17630 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7923 0039d316-1c4b-4281-b951-d872f2087c98
* Removing unnecessary include that broke the dependency tests.tommi@chromium.org2009-01-121-1/+0
| | | | | | | | TBR=maruel Review URL: http://codereview.chromium.org/17622 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7897 0039d316-1c4b-4281-b951-d872f2087c98
* fix linux build: don't inline in cc filetc@google.com2009-01-121-4/+4
| | | | | | | Review URL: http://codereview.chromium.org/17619 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7894 0039d316-1c4b-4281-b951-d872f2087c98
* com_ptr implementation. This is a fairly simple implementation of a smart ↵tommi@chromium.org2009-01-125-2/+214
| | | | | | | | | | | class specifically meant for IUnknown derived COM interfaces. The class gets much of its functionality from the already existing scoped_refptr but adds a few COM specific methods and some that scoped_refptr doesn't already have, yet are often necessary such as Receive(), Detach() and Attach(). I went with caps for the first letter of method names, but for the three I just mentioned, it might be prettier to have them in all lower case to better match with methods from the parent class. Let me know what you think. Review URL: http://codereview.chromium.org/17473 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7890 0039d316-1c4b-4281-b951-d872f2087c98
* Updates to Visual Studio project generation to accomodatesgk@google.com2009-01-105-30/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recent changes and get rid of cut-and-paste: * Add generation of the new net_resource.vcproj file. * Accomodate the net\net.vsprops file. * New base.vcproj dependency in activex_shim_dll.vcproj. * New tld_cleanup.vcproj dependency in net.vcproj. * New ondemand_updates.vcproj dependencies in gcapi_{dll,lib}.vcproj. * Re-order dump_cache.vcproj dependencies to match new checked-in solutions. * New input file directory layout in zlib (minizip folder) and testing\gtest (hierarchy). * Use a new dest= argument to ChromeMSVSSolution() and ChromeMSVSProject() to get rid of cut-and-pste installation code, and provide a central point for controlling when/whether we want to generate the files only under the build directory, or drop them in place for checking in. * Comment out an unnecessarily verbose warning if the buildtarget is executed with an action that we don't map to specific Visual Studio settings. Sometimes this is normal and okay, but the warning should get restored at some point when we work out the precise conditions under which it makes sense. Review URL: http://codereview.chromium.org/17602 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7856 0039d316-1c4b-4281-b951-d872f2087c98
* Changing access to scoped_refptr member variables from private to protected.tommi@chromium.org2009-01-102-1/+17
| | | | | | | | This is required to be able to extend the functionality of the class where existing public functionality does not offer sufficient access. Review URL: http://codereview.chromium.org/17464 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7851 0039d316-1c4b-4281-b951-d872f2087c98
* Move Contains() method to file_utils, stop relying on in extensions_protocolaa@chromium.org2009-01-096-79/+76
| | | | | | Review URL: http://codereview.chromium.org/16805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7841 0039d316-1c4b-4281-b951-d872f2087c98
* Add implementations of various extension related methods (derived from ↵erikkay@google.com2009-01-094-17/+282
| | | | | | | | | | | | file_util): Extension, RemoveExtension, InsertBeforeExtension, ReplaceExtension I didn't reimplement the old file_util ones since they actually modify the FilePath in place, which isn't the style of the rest of the FilePath methods. I'll file a cleanup bug after this for callers to switch to the new methods. Review URL: http://codereview.chromium.org/17243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7811 0039d316-1c4b-4281-b951-d872f2087c98
* Move the vector canvas unit test data to the skia/ext directory. It wasn'tbrettw@chromium.org2009-01-0884-0/+0
| | | | | | | | | | | trivial to move the directory the way the test code was laid out (since we now add two levels) so I refactored it a bit to get rid of the base class (which wasn't actually used for anything useful). BUG=5016 Review URL: http://codereview.chromium.org/16550 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7756 0039d316-1c4b-4281-b951-d872f2087c98
* Data pack file reader and unit test, used for resources on Linux.evan@chromium.org2009-01-086-0/+203
| | | | | | | | | See http://dev.chromium.org/developers/design-documents/linuxresourcesandlocalizedstrings for more details. Review URL: http://codereview.chromium.org/17253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7751 0039d316-1c4b-4281-b951-d872f2087c98
* Significantly increase timeouts to reduce flakinessjar@google.com2009-01-081-8/+7
| | | | | | | | | | | | | | | | | Several tests now "plan for success" and will terminate rapidly if all goes well (and will hang if there really is a problem). One test I just upped by a factor of 5, hoping that I'll get a timem slice within a 5 second window, rather than assuming that I'll get one within a 1 second window. I could go further, but the test now takes over 5 seconds to run, which seems like a lot of time for a trivial test. bug=5723 r=maruel Review URL: http://codereview.chromium.org/16495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7744 0039d316-1c4b-4281-b951-d872f2087c98
* Don't DCHECK if a watched directory doesn't exist.aa@chromium.org2009-01-072-3/+10
| | | | | | | | | The caller can't easily check whether a directory exists before calling this functions. Also modify GreasemonkeyMaster to allow this condition. Review URL: http://codereview.chromium.org/16580 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7687 0039d316-1c4b-4281-b951-d872f2087c98
* Convert download manager to FilePath.estade@chromium.org2009-01-064-13/+26
| | | | | | | | (Fixed up version of issue 17032. Now passes all unit tests.) Review URL: http://codereview.chromium.org/16533 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7630 0039d316-1c4b-4281-b951-d872f2087c98
* Butcher some files to make ui_tests run 0 tests on Linux.evanm@google.com2009-01-061-0/+6
| | | | | | | Review URL: http://codereview.chromium.org/16545 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7613 0039d316-1c4b-4281-b951-d872f2087c98
* Move plugins to FilePaths, some cleanupavi@google.com2009-01-062-6/+11
| | | | | | Review URL: http://codereview.chromium.org/16456 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7588 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup base/watchdog thread delegate.phajdan.jr@chromium.org2009-01-062-5/+5
| | | | | | Review URL: http://codereview.chromium.org/17038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7585 0039d316-1c4b-4281-b951-d872f2087c98
* Keep trying to undo 7564.estade@chromium.org2009-01-055-10/+7
| | | | | | | | tbr=jhawkins Review URL: http://codereview.chromium.org/17062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7572 0039d316-1c4b-4281-b951-d872f2087c98
* Unbreak unit tests. Revert r7564.estade@chromium.org2009-01-056-27/+16
| | | | | | | | tbr=jhawkins Review URL: http://codereview.chromium.org/16522 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7571 0039d316-1c4b-4281-b951-d872f2087c98
* * switch download manager to using FilePathestade@chromium.org2009-01-053-6/+20
| | | | | | | | | * add empty() function to FilePath * implement file_util::GetFileExtensionFromPath Review URL: http://codereview.chromium.org/17032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7564 0039d316-1c4b-4281-b951-d872f2087c98
* Watchdog test is flaky, try relaxing timeout.dkegel@google.com2009-01-051-1/+2
| | | | | | | (2nd try at getting a review, this time with nsylvain.) Review URL: http://codereview.chromium.org/16474 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7558 0039d316-1c4b-4281-b951-d872f2087c98
* Move KillProcess from linux to posix so it can be used on the Mac.dkegel@google.com2009-01-052-24/+25
| | | | | | | | This was originally part of http://codereview.chromium.org/16207 and is broken out here so I can get the small stuff out of the way. Review URL: http://codereview.chromium.org/16498 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7554 0039d316-1c4b-4281-b951-d872f2087c98