summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* 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
* We're hoping to find exit codes that are incorrectly counted jar@google.com2008-08-231-4/+34
| | | | | | | | | | | | | as "crashes" but are "not really." Toward that end, we want a "complete" list of exit codes, which categorigized as "crashes." Note we don't record stats when we "recognize" the exit code. r=evanm,nsylvain git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1269 0039d316-1c4b-4281-b951-d872f2087c98
* Adds capabilities for IPC messages of type long, for the primary purpose of ↵klink@google.com2008-08-222-0/+20
| | | | | | accessibility related communication. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1263 0039d316-1c4b-4281-b951-d872f2087c98
* Add the condition variable unittest to all builds.paulg@google.com2008-08-221-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1253 0039d316-1c4b-4281-b951-d872f2087c98
* Make the condition variable unit test cross platform.paulg@google.com2008-08-223-89/+87
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1246 0039d316-1c4b-4281-b951-d872f2087c98
* De-winify context headers in prep for future mac implementations. First step.pinkerton@google.com2008-08-221-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1239 0039d316-1c4b-4281-b951-d872f2087c98
* Impl of platform mime typing for Mac.avi@google.com2008-08-223-5/+62
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1238 0039d316-1c4b-4281-b951-d872f2087c98
* Work around a UMR reported by purify by using a different ICUtc@google.com2008-08-221-1/+5
| | | | | | | | | | | | method. The internets tell me that the UMR in getTerminatedBuffer() is harmless [1], but this seems better anyway. BUG=1339780 [1] http://osdir.com/ml/lib.icu.c++.support/2005-03/msg00022.html git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1232 0039d316-1c4b-4281-b951-d872f2087c98
* Remove CallWrapper and SimpleThread. They overlap too closely with the ↵deanm@google.com2008-08-228-820/+0
| | | | | | message loop variants Thread and Task. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1230 0039d316-1c4b-4281-b951-d872f2087c98
* Properly initialize PlatformThreadHandle. The Open Group Base ↵deanm@google.com2008-08-222-4/+6
| | | | | | Specifications Issue 6 states that pthread_t cannot be assumed to be a numeric type. It should be safe to value initialize it with (), even if it's a structure. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1226 0039d316-1c4b-4281-b951-d872f2087c98
* Back out r1223, we'll just look at the logs on the buildbots for now. It ↵mmentovai@google.com2008-08-221-1/+1
| | | | | | would be nice to send only ERROR warnings to stderr to avoid the noise. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1225 0039d316-1c4b-4281-b951-d872f2087c98
* Make CallWrappers multiuse. No longer make CallWrapper->Run() self ↵deanm@google.com2008-08-225-51/+90
| | | | | | deleting. Since the SimpleThread API backs to joinable threads, the common use case makes it simple for the caller to manage the CallWrapper memory, and this makes everything much clearer. This also allows a CallWrapper's Run() to be called multiple times. This also moves CallWrapper into the base namespace, which I'm told is all the rage these days. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1224 0039d316-1c4b-4281-b951-d872f2087c98
* Send log output to stderr on Windows when uninitializedmmentovai@google.com2008-08-221-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1223 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up some method naming style.deanm@google.com2008-08-221-13/+14
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1218 0039d316-1c4b-4281-b951-d872f2087c98
* Create a simple abstraction to a native OS thread, mostly useful for ↵deanm@google.com2008-08-227-2/+372
| | | | | | unittesting when you don't want a message loop. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1217 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up warnings in Skia (also sent upstream)mmentovai@google.com2008-08-221-2/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1209 0039d316-1c4b-4281-b951-d872f2087c98
* Disable -Werror in base_gfx until Skia is fixedmmentovai@google.com2008-08-221-0/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1208 0039d316-1c4b-4281-b951-d872f2087c98
* Enable -Werror on the Mac. Fix two more warnings just added to our build. ↵mmentovai@google.com2008-08-221-3/+3
| | | | | | Note that the targets for libskia and libicuuc still exclude themselves from -Werror. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1205 0039d316-1c4b-4281-b951-d872f2087c98
* Add more base unittests that are now passing to the mac build.paulg@google.com2008-08-211-0/+8
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1201 0039d316-1c4b-4281-b951-d872f2087c98