summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of an unneded static variable in the Mac TimeTicks::Nowmmentovai@google.com2008-09-091-6/+10
| | | | | | Review URL: http://codereview.chromium.org/1849 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1911 0039d316-1c4b-4281-b951-d872f2087c98
* Bulk fixes to get Mac Test Shell more compile-happy.avi@google.com2008-09-091-0/+5
| | | | | | Review URL: http://codereview.chromium.org/1818 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1909 0039d316-1c4b-4281-b951-d872f2087c98
* Revert the timeBeginPeriod changes in event_recorder. It's doing it's own ↵deanm@google.com2008-09-092-4/+10
| | | | | | | | timeGetTime calls, so let it manage all of those APIs on it's own. Remove an unneeded include in message_loop.cc. Review URL: http://codereview.chromium.org/1842 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1894 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply r1633 (which was reverted by r1635), with some additional ↵deanm@google.com2008-09-095-91/+101
| | | | | | | | modifications. Consolidate all timer resolution code to time.h, and always depend on TimeTicks::Now for 1ms resolution. Review URL: http://codereview.chromium.org/1806 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1893 0039d316-1c4b-4281-b951-d872f2087c98
* rollback r1891darin@google.com2008-09-093-98/+30
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1892 0039d316-1c4b-4281-b951-d872f2087c98
* Delete pending tasks that have not run. To do this properly, I found that I ↵darin@google.com2008-09-093-30/+98
| | | | | | | | | | | | cannot clear MessageLoop::current() until all of the tasks have been deleted. I wrote a loop to make sure that the queues are all empty. This could be abused, obviously. Another approach would be to CHECK that the second loop doesn't do anything. Thoughts? R=jar Review URL: http://codereview.chromium.org/1829 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1891 0039d316-1c4b-4281-b951-d872f2087c98
* Rename "run net_unittests" to "run_net_unittests" like we do with other unitmmentovai@google.com2008-09-081-1/+1
| | | | | | | | test targets. Use a script that can be copied and pasted for all unit test targets by depending on the product name variable. Review URL: http://codereview.chromium.org/1637 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1872 0039d316-1c4b-4281-b951-d872f2087c98
* Add LazyInstance (r1837) to the Mac buildmmentovai@google.com2008-09-081-0/+10
| | | | | | Review URL: http://codereview.chromium.org/1814 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1844 0039d316-1c4b-4281-b951-d872f2087c98
* Just by implementing a destructor (even if it's not doing anything), MSVC ↵deanm@google.com2008-09-081-2/+4
| | | | | | | | will register a static initializer as to register the empty destructor. Pretty awesome. Verified that the c++ initializer is no longer in the __xc_a array. Review URL: http://codereview.chromium.org/1812 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1841 0039d316-1c4b-4281-b951-d872f2087c98
* Add a DISALLOW_COPY_AND_ASSIGN to LazyInstanceHelper.deanm@google.com2008-09-081-0/+3
| | | | | | Review URL: http://codereview.chromium.org/1811 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1839 0039d316-1c4b-4281-b951-d872f2087c98
* Create a LazyInstance abstraction for avoiding static constructors by lazily ↵deanm@google.com2008-09-086-0/+253
| | | | | | | | creating an instance of an object on first access. This is like Singleton, but without the Singleton property of sharing instances. This also preallocates space for the object to avoid the heap to try to help fragmentation and creation performance. Review URL: http://codereview.chromium.org/1608 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1837 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the ifdef platform jungle from hmac.h, abstracting the platform ↵deanm@google.com2008-09-083-78/+59
| | | | | | | | specific data into a platform specific heap-allocated structure. Review URL: http://codereview.chromium.org/1614 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1836 0039d316-1c4b-4281-b951-d872f2087c98
* Add a void* parameter to the AtExitManager callbacks.deanm@google.com2008-09-084-30/+47
| | | | | | Review URL: http://codereview.chromium.org/1805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1835 0039d316-1c4b-4281-b951-d872f2087c98
* Just compile some basic files so we get a libGlue.a.evanm@google.com2008-09-071-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1829 0039d316-1c4b-4281-b951-d872f2087c98
* Fix purify MLK errors resulting from my previous check-in. The TimerManager ↵darin@google.com2008-09-071-0/+7
| | | | | | | | | | previously deleted pending timers. We need to do the same for PostDelayedTask. This CL makes it so. TBR=jar Review URL: http://codereview.chromium.org/1607 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1826 0039d316-1c4b-4281-b951-d872f2087c98
* 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