summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate the TimerManager by pulling its priority queue into MessageLoop. ↵darin@google.com2008-09-0710-1164/+393
| | | | | | | | | | This CL also eliminates TaskBase by creating a simple PendingTask struct that is allocated inline within a std::queue used to implement the queues in the MessageLoop class. R=jar Review URL: http://codereview.chromium.org/483 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1825 0039d316-1c4b-4281-b951-d872f2087c98
* [new http] Normalize line continuations in response headers.ericroman@google.com2008-09-061-7/+9
| | | | | | | | BUG=1272571 Review URL: http://codereview.chromium.org/458 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1818 0039d316-1c4b-4281-b951-d872f2087c98
* Add non_thread_safe.cc and trace_event.cc to the Mac buildmmentovai@google.com2008-09-051-0/+12
| | | | | | Review URL: http://codereview.chromium.org/257 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1789 0039d316-1c4b-4281-b951-d872f2087c98
* SCons build: move hamc_win.cc from the list of to-be-ported sourcesgk@google.com2008-09-051-1/+2
| | | | | | | | files to the list of Windows-only source files. Add hmac_mac.cc to the list fo Mac-only source files. Review URL: http://codereview.chromium.org/256 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1787 0039d316-1c4b-4281-b951-d872f2087c98
* Add base\trace_event.cc to the SCons build.sgk@google.com2008-09-041-0/+1
| | | | | | Review URL: http://codereview.chromium.org/449 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1739 0039d316-1c4b-4281-b951-d872f2087c98
* HMAC-SHA1 implementation for Mac based on CommonCrypto;mmentovai@google.com2008-09-047-51/+235
| | | | | | | allow Windows HMAC-SHA1 to use keys longer than 16 bytes. Review URL: http://codereview.chromium.org/218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1724 0039d316-1c4b-4281-b951-d872f2087c98
* Make gcc 4.1 happy with NULL in EXPECT_EQ.mmoss@google.com2008-09-041-3/+3
| | | | | | | | | This avoids warnings like: src/base/thread_local_unittest.cc:88: warning: passing NULL to non-pointer argument 3 of 'static testing::AssertionResult testing::internal::EqHelper<true>::Compare(const char*, const char*, const T1&, T2*) [with T1 = int, T2 = <unnamed>::ThreadLocalTesterBase]' Review URL: http://codereview.chromium.org/226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1716 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r1648 in timer_unittest.cc, this was for testing and should have nevermmentovai@google.com2008-09-041-24/+0
| | | | | | | escaped my working copy. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1712 0039d316-1c4b-4281-b951-d872f2087c98
* Run thread_local_unittest on all platforms.deanm@google.com2008-09-031-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1686 0039d316-1c4b-4281-b951-d872f2087c98
* Add at least some code that tests UnreliableHighResNow. I realize it can be ↵deanm@google.com2008-09-031-0/+8
| | | | | | broken, but we should test it if we're going to have the code. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1685 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup to OneShotTimer and RepeatingTimer: moves more of the member ↵darin@google.com2008-09-035-77/+100
| | | | | | | | | | | variables into the Task subclass. Also included in this change: deprecate MessageLoop::timer_manager(), and change consumers over to use OneShotTimer or RepeatingTimer. R=beng BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1684 0039d316-1c4b-4281-b951-d872f2087c98
* Build and test ThreadLocal* for Mac (r1678)mmentovai@google.com2008-09-031-0/+12
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1683 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a typo that broke the posix build.deanm@google.com2008-09-031-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1681 0039d316-1c4b-4281-b951-d872f2087c98
* Add ThreadLocalPointer and ThreadLocalBoolean abstractions, that will ↵deanm@google.com2008-09-039-9/+383
| | | | | | deprecate the old ThreadLocalStorage / TLSSlot APIs. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1678 0039d316-1c4b-4281-b951-d872f2087c98
* Move icu.xcodeproj into the icu38 directory, as is done with all othermmentovai@google.com2008-09-031-1/+1
| | | | | | | xcodeprojs git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1675 0039d316-1c4b-4281-b951-d872f2087c98
* Set svn:eol-style = LF on files in base from which it is missingmmentovai@google.com2008-09-0215-1039/+1063
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1648 0039d316-1c4b-4281-b951-d872f2087c98
* Initial pass at simple event tracing. I added a few traces to tcp_socket ↵erikkay@google.com2008-09-023-2/+303
| | | | | | | | | | | | and test_shell to get an idea of what a simple trace might look like. Here's a sample output line: 11:24:19.660604 0x1e278:0x1e24c BEGIN url.load [0x5 http://mail.google.com/mail/] <E:\src\cr\src\webkit\tools\test_shell\test_webview_delegate.cc:189> format is:hh:mm:ss.us pid:tid TYPE NAME [id, extra] <file:line> git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1641 0039d316-1c4b-4281-b951-d872f2087c98
* Add simple_thread, its unittest, and atomicops_unittest on the Macmmentovai@google.com2008-09-021-0/+14
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1640 0039d316-1c4b-4281-b951-d872f2087c98
* Add a LinkerInitialized constructor to AtomicSequenceNumber.deanm@google.com2008-09-022-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1636 0039d316-1c4b-4281-b951-d872f2087c98
* Revert part of r1633 Windows time changes, seems to have caused test failures?deanm@google.com2008-09-022-71/+55
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1635 0039d316-1c4b-4281-b951-d872f2087c98
* Add a simple thread pool to SimpleThread.deanm@google.com2008-09-023-1/+183
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1634 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup some Windows TimeTicks functions. Move TickTicks::Now and ↵deanm@google.com2008-09-026-162/+180
| | | | | | | | TicksTicks::UnreliableHighResNow to Singletons, which cleans up the code and removes some possible unsafe cross-thread access. Move the Windows-specific rollover tests to time_unittests_win. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1633 0039d316-1c4b-4281-b951-d872f2087c98
* Update Copyright text in SCons config files.sgk@google.com2008-09-013-84/+12
| | | | | | TBR: beng git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1607 0039d316-1c4b-4281-b951-d872f2087c98
* fix ui testsdarin@google.com2008-08-301-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1584 0039d316-1c4b-4281-b951-d872f2087c98
* Remove assertion in Timer() because it was too aggressive. Instead, we need todarin@google.com2008-08-301-2/+5
| | | | | | | | | just treat a negative delay as a zero delay. TBR=mbelshe git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1582 0039d316-1c4b-4281-b951-d872f2087c98
* fix mac builddarin@google.com2008-08-301-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1581 0039d316-1c4b-4281-b951-d872f2087c98
* A better fix for the hang observed while running net_unittests on vista. Thisdarin@google.com2008-08-301-8/+10
| | | | | | | | | | | fix avoids a crash as well by not calling ProcessPumpReplacementMessage. Instead, we just reset the have_work_ flag. TBR=rvargas,jar BUG=1351146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1580 0039d316-1c4b-4281-b951-d872f2087c98
* Switch SharedTimerWin over to using PostDelayedTask. I made some tweaks to thedarin@google.com2008-08-307-49/+68
| | | | | | | | | | | | | PostDelayedTask implementation to ensure that perf is still good. This involved recording the intended fire time of PostDelayedTask on the Task object so that it can be used to properly determine the delay passed to the StartTimer call. With this change, I am able to service timers (call DoDelayedWork) more often from within the MessagePump implementations. R=mbelshe BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1578 0039d316-1c4b-4281-b951-d872f2087c98
* Fix net_unittests hang observed on Vista. It turns out that a subpump wasdarin@google.com2008-08-291-5/+6
| | | | | | | | | | | | | | | | | being run within shell32, which was causing our kHaveWorkMsg to get dispatched. However, because that was occuring outside the context of a MessagePump::Run call, the handler for kHaveWorkMsg was returning early. Unfortunately, this means that it was failing to reset the have_work_ sentinel to 0. Because of that future calls to ScheduleWork would always be a no-op (as they return early when have_work_ is already set to 1). The proper fix is to just re-order the calls so that ProcessPumpReplacementMessage always runs in response to kHaveWorkMsg, but we still suppress calling DoWork until we are inside MessagePump::Run. TBR=rvargas,jar git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1544 0039d316-1c4b-4281-b951-d872f2087c98
* platform ifdefs for webview. Add platform_viewdefs to wrap things like HWNDs ↵pinkerton@google.com2008-08-291-0/+38
| | | | | | to keep APIs more crossplatform. Fix uses of PlatformCanvasWin to just use PlatformCanvas. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1528 0039d316-1c4b-4281-b951-d872f2087c98
* We are not going to support win2k, so this test can always run.deanm@google.com2008-08-291-14/+2
| | | | | | BUG=1084719 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1527 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a test to avoid a MSVC warning as error about constant truncation.deanm@google.com2008-08-291-2/+10
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1524 0039d316-1c4b-4281-b951-d872f2087c98
* Import upstream atomicop tests.deanm@google.com2008-08-293-0/+234
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1522 0039d316-1c4b-4281-b951-d872f2087c98
* Bring back SimpleThread, but with a Delegate interface.deanm@google.com2008-08-296-0/+306
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1519 0039d316-1c4b-4281-b951-d872f2087c98
* 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