summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* fix base_unittets bustage observed on mac/linuxdarin@google.com2008-08-291-2/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1516 0039d316-1c4b-4281-b951-d872f2087c98
* fix purify errordarin@google.com2008-08-281-0/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1514 0039d316-1c4b-4281-b951-d872f2087c98
* Provide what looks like the minimal platform specific interface for skia. ↵erg@google.com2008-08-2810-4/+237
| | | | | | This will undoubtedly grow in the future. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1513 0039d316-1c4b-4281-b951-d872f2087c98
* Reading the comments on a later change, it seems I should have only used a ↵dsh@google.com2008-08-281-1/+1
| | | | | | copyright of 2008 on this new file, so this fixes it. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1509 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify OneShotTimer and RepeatingTimer. Fix up all consumers.darin@google.com2008-08-288-155/+372
| | | | | | | | | | | | | | | | | | | | | | | | Major changes: OneShotTimer and RepeatingTimer become template classes that no longer require a Task or a Timer object. They just use PostDelayedTask. Under the hood that still uses a Timer object. The API is much simpler for consumers as they now no longer need to worry about allocating a Task or managing the lifetime of the object pointer held by the Task. I added some new unit tests to timer_unittest.cc to cover the API. I preserved the old TimerManager / Timer API for now, but I plan to soon kill it. R=brettw BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1502 0039d316-1c4b-4281-b951-d872f2087c98
* WorkerPool implementation for Mac, using NSOperationQueuemmentovai@google.com2008-08-284-1/+148
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1493 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure Cocoa sets up its multithreaded environmentmmentovai@google.com2008-08-285-10/+74
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1476 0039d316-1c4b-4281-b951-d872f2087c98
* Add unit tests for WorkerPool and add a working but poor implementation for ↵dsh@google.com2008-08-273-1/+83
| | | | | | Linux. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1466 0039d316-1c4b-4281-b951-d872f2087c98
* Move std::string16 to base::string16. Don't pollute the std namespace. Don'tmmentovai@google.com2008-08-277-139/+162
| | | | | | assume that all string types can be represented as std::basic_string<CHAR>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1464 0039d316-1c4b-4281-b951-d872f2087c98
* Use correct decls for non-windows platforms. Create a platform-neutral ↵pinkerton@google.com2008-08-271-0/+7
| | | | | | wrapper for everyone to use. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1463 0039d316-1c4b-4281-b951-d872f2087c98
* Some more passing tests in base for Linuxmmentovai@google.com2008-08-274-64/+37
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1460 0039d316-1c4b-4281-b951-d872f2087c98
* Use our own bz_internal_errormmentovai@google.com2008-08-271-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1457 0039d316-1c4b-4281-b951-d872f2087c98
* On .mm files in net and base:mmentovai@google.com2008-08-275-164/+36
| | | | | | | | - Update the license boilerplate - Set svn:eol-style properly - Get rid of trailing whitespace git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1455 0039d316-1c4b-4281-b951-d872f2087c98
* Rename atomicops_internals_x86_mac.h back to its original name,mmentovai@google.com2008-08-273-6/+7
| | | | | | | atomicops_internals_x86_macosx.h. I didn't realize this was brought in as-is from upstream. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1451 0039d316-1c4b-4281-b951-d872f2087c98
* Add more passing tests to base_unittests. Add a few more headers we use tommentovai@google.com2008-08-273-10/+25
| | | | | | base.xcodeproj. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1446 0039d316-1c4b-4281-b951-d872f2087c98
* Include process_util_posix.cc in POSIX SCons buildsmmentovai@google.com2008-08-271-0/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1443 0039d316-1c4b-4281-b951-d872f2087c98
* Fix process_util_posix.ccmmentovai@google.com2008-08-273-5/+8
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1442 0039d316-1c4b-4281-b951-d872f2087c98
* Stub out a few things into process_util_posix.deanm@google.com2008-08-271-0/+26
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1441 0039d316-1c4b-4281-b951-d872f2087c98
* Make perftimer and run_all_perftests compile on Posix. Stub out a few ↵deanm@google.com2008-08-277-24/+32
| | | | | | | | things into process_util_posix, and add a function to raise to a high priority. BUG=1343318 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1438 0039d316-1c4b-4281-b951-d872f2087c98
* rollback r1427 to attempt to fix test failuresdarin@google.com2008-08-271-0/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1429 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the net_perftests to work again.darin@google.com2008-08-271-22/+29
| | | | | | | | | Since only one test needed a MessageLoop, I decided to only give that single test a MessageLoop. I used a MessageLoopForIO (subclass of MessageLoop) for future use when the disk cache leverages MessageLoopForIO for asynchronous IO. TBR=rvargas git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1428 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable DeletePendingTasks. We need this to plug memory leaks in the unitdarin@google.com2008-08-271-2/+0
| | | | | | | | | tests. TBR=abarth git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1427 0039d316-1c4b-4281-b951-d872f2087c98
* Add dcheck to CloseHandle()cpu@google.com2008-08-271-2/+5
| | | | | | | | - So we can catch invalid uses - Fix bug in ScopedHandle discovered by testing the dcheck. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1424 0039d316-1c4b-4281-b951-d872f2087c98
* Use COMPILE_ASSERT instead of DCHECK for compile-time constant checksmmentovai@google.com2008-08-271-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1418 0039d316-1c4b-4281-b951-d872f2087c98
* Update pr_time_unittest.cc in base.xcodeproj following r1375mmentovai@google.com2008-08-271-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1417 0039d316-1c4b-4281-b951-d872f2087c98
* Mark the platform_canvas_unittest as windows specific.erg@google.com2008-08-273-9/+9
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1415 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Linux & Mac builds. I swapped the types of two templates.brettw@google.com2008-08-261-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1398 0039d316-1c4b-4281-b951-d872f2087c98
* Update base.xcodeproj following r1375mmentovai@google.com2008-08-261-12/+12
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1394 0039d316-1c4b-4281-b951-d872f2087c98
* Add UTF8 <-> UTF-16 conversion functions, and a WebCore::String -> ↵brettw@google.com2008-08-262-17/+106
| | | | | | std::string function. We already have a std::string -> WebCore::String function. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1393 0039d316-1c4b-4281-b951-d872f2087c98
* Remove false 'process crash' signal (again)cpu@google.com2008-08-261-9/+20
| | | | | | | | | | | This is a redo of a previous CL that has been lgtm (by sky) that got hosed. - Sometimes we kill a plugin or a renderer by calling exitprocess(.., HUNG) we were counting that as a crash - Check for the return code and make a dchek into a regular case. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1389 0039d316-1c4b-4281-b951-d872f2087c98
* Another attempt at enabling stderr logging for ERROR and FATAL logs. This ↵erikkay@google.com2008-08-261-2/+2
| | | | | | | | | will break a few layout tests. (I'll add them to the fixable list shortly) BUG=1343647 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1385 0039d316-1c4b-4281-b951-d872f2087c98
* Add a trailing EOL to tracked_objects_unittest, elimates a GCC warning.deanm@google.com2008-08-261-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1378 0039d316-1c4b-4281-b951-d872f2087c98
* Move process_util.cc to process_util_win.cc to make way for posix.deanm@google.com2008-08-263-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1377 0039d316-1c4b-4281-b951-d872f2087c98
* Move unittests that had a _test filename to _unittest. Update some missing ↵deanm@google.com2008-08-267-9/+11
| | | | | | tests in the SCons build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1375 0039d316-1c4b-4281-b951-d872f2087c98
* Disable this DCHECK since too many consumers expect to be able todarin@google.com2008-08-261-1/+3
| | | | | | | | | call this when there is no MessageLoop for the current thread. TBR=jabdelmalek git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1372 0039d316-1c4b-4281-b951-d872f2087c98
* fix broken test that assumed it could cache MessageLoop::current() in a ↵darin@google.com2008-08-261-2/+1
| | | | | | static variable git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1369 0039d316-1c4b-4281-b951-d872f2087c98
* revert to using MessagePumpWin on all threadsdarin@google.com2008-08-261-12/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1368 0039d316-1c4b-4281-b951-d872f2087c98
* fix unit test that was missing a MessageLoop allocationdarin@google.com2008-08-261-6/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1366 0039d316-1c4b-4281-b951-d872f2087c98
* fix linux builddarin@google.com2008-08-261-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1364 0039d316-1c4b-4281-b951-d872f2087c98
* Allow consumers of MessageLoop to specify the type of MessageLoop they want.darin@google.com2008-08-2613-223/+503
| | | | | | | | | | | | | | | | This CL introduces a Type enum to MessageLoop, and I also created subclasses of MessageLoop corresponding to the non-default types: MessageLoopForIO and MessageLoopForUI. I moved all of the platform-specific MessageLoop APIs onto either MessageLoopForIO or MessageLoopForUI. MessageLoopForIO gets the Watcher API, and MessageLoopForUI gets the Observer and Dispatcher APIs. Under the hood, both are implemented in terms of MessagePumpWin, but that will change in a future CL. The Thread class is changed to allow the consumer to specify the Type of MessageLoop they want to have setup on the created thread. I re-organized message_loop_unittest.cc and timer_unittest.cc so that I could exercise all (or most) of the tests against each type of MessageLoop. Note: I know that "explicit MessageLoop(Type type = TYPE_DEFAULT);" is in violation to the style-guide's restriction against default arguments. I'm working on finding a decent solution to that problem. Please ignore this issue for now. The corresponding chrome/ changes are coming in a separate CL due to Reitveld data size limitations. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1362 0039d316-1c4b-4281-b951-d872f2087c98
* An earlier change I made sent all logging output to stderr. The webkit ↵erikkay@google.com2008-08-251-2/+11
| | | | | | | | | | | layout tests use stdout and stderr to diff against a known baseline, so this breaks some tests. For now, move the fprintf into the #else. This still leaves Windows and Mac in a state where they won't be able to pass layout tests, until the layout tests can be changed to initialize logging and set the log level to something less verbose. BUG=1343647 TBR=brettw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1353 0039d316-1c4b-4281-b951-d872f2087c98
* When we're only outputting to a log file, above a certain log level, we ↵erikkay@google.com2008-08-251-2/+10
| | | | | | should still output to stderr so that we can better detect and diagnose problems with unit tests, especially on the buildbots. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1323 0039d316-1c4b-4281-b951-d872f2087c98
* Fixup some nits from brettpinkerton@google.com2008-08-251-1/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1322 0039d316-1c4b-4281-b951-d872f2087c98
* Updated comment in thread naming.avi@google.com2008-08-251-1/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1308 0039d316-1c4b-4281-b951-d872f2087c98
* Make PlatformThread::SetName operate only on the current thread.deanm@google.com2008-08-255-8/+10
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1306 0039d316-1c4b-4281-b951-d872f2087c98
* Add example usages and tests to scoped_ptr.h and tuple.h.deanm@google.com2008-08-256-5/+346
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1305 0039d316-1c4b-4281-b951-d872f2087c98
* Add a test that passes on Linux.deanm@google.com2008-08-251-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1304 0039d316-1c4b-4281-b951-d872f2087c98
* Move NOTIMPLEMENTED() macro from "base/notimplemented.h" into "base/logging.h".ericroman@google.com2008-08-257-55/+35
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1300 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-24287-10266/+3376
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add a spinlock wait to the dearly beloved crititcal sectioncpu@google.com2008-08-231-1/+3
| | | | | | | | - the 2000 is a guess, I think the right number is between 1000 and 4000 - lets look at perf, if hurts then we remove it git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1271 0039d316-1c4b-4281-b951-d872f2087c98