summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Add an HMAC implementation using NSS. Include centralized NSS ↵deanm@google.com2008-09-164-1/+162
| | | | | | initialization, based on code from phajdan.jr. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2260 0039d316-1c4b-4281-b951-d872f2087c98
* Provide necessary constructors in StackAllocator and PrivateHookAllocator to ↵maruel@google.com2008-09-141-4/+22
| | | | | | | | | | | | | | | | | permit release mode building in VC++2008 SP1. The current allocators do not conform with the C++ spec for allocators, and unlike previous versions, VC++2008 requires conformant allocators. The reason that the allocators are not conformant is that any allocator, say, template<typename T> struct Alloc; must have a constructor of the following form: template<typename U> Alloc(const Alloc<U>& other) to allow construction of an Alloc<T> from an Alloc<U>. The constructors cannot be explicit, because they're (essentially) copy constructors, and so are not called explicitly. StackAllocator has no converting copy constructor at all, and PrivateHookAllocator's is declared explicit, preventing it from being usable. Without the StackAllocator constructor, StackVectors fail (due to the std::vector member, base\stack_container.h(216)). Patch by Peter Bright <drpizza@quiscalusmexicanus.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2175 0039d316-1c4b-4281-b951-d872f2087c98
* This change ensures that base_unittests will not segfault on this.maruel@google.com2008-09-121-0/+3
| | | | | | | | | | I actually managed to crash it. I had /dev/shm unmounted by accident. In these conditions the test fail and you get SIGSEGV. Patch by Pawel Hajdan jr <phajdan.jr@gmail.com> git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2121 0039d316-1c4b-4281-b951-d872f2087c98
* Add a few more cases for Unicode blocks to script mapping. This is for next ↵jungshik@google.com2008-09-121-4/+23
| | | | | | | | | | | | | | | | | point release (of beta branch) to fix issue 1328. It includes Hironori's change to add a missing 'break'. ( http://codereview.chromium.org/1698 ) BUG=1328 TEST=After installing pandauk font (mentioned in 1328), go to http://my.wikipedia.org, copy and paste a Burmese word into the search box. It should be rendered as in the body (the rest) of the page. Review URL: http://codereview.chromium.org/2460 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2117 0039d316-1c4b-4281-b951-d872f2087c98
* Port the thread local storage unittest to Mac and linux.paulg@google.com2008-09-113-39/+52
| | | | | | Review URL: http://codereview.chromium.org/1963 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2101 0039d316-1c4b-4281-b951-d872f2087c98
* Capture initial SCons build of {base,net,googleurl}_unittests on Mac:sgk@google.com2008-09-111-2/+10
| | | | | | | | | | | | | * Initial flags and options that mimick how XCode builds (e.g. XCode uses "gcc -x c++" to compile C++, but g++ to link it). * Load minimal set of SConscript files: base, googleurl, net, skia, testing, third_party. (breakpad and webkit to come.) * Correct .cc => .mm file names (multiple places). * Add base/{platform_thread,platform_test,worker_pool}_mac.mm. * Remove -Wall when we build Skia, like we do on Linux. Review URL: http://codereview.chromium.org/2435 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2097 0039d316-1c4b-4281-b951-d872f2087c98
* Sort allegedly-sorted listsmark@chromium.org2008-09-111-2/+6
| | | | | | Review URL: http://codereview.chromium.org/1959 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2086 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX/Linux related changes to file_util:mark@chromium.org2008-09-113-20/+78
| | | | | | | | | | | | | | - Replaced mktemp with mkstemp - Implemented file_util::CopyFile for Linux, run FileUtilTest on Linux - Cleaned up some invalid uses of c_str() on a temporary std::string - Changed file_util::WriteFile to allow for partial writes Patch by Matthias Reitinger <reimarvin@gmail.com> http://codereview.chromium.org/1869 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2070 0039d316-1c4b-4281-b951-d872f2087c98
* CreateDirectory() should check if an existing path is actually a directory ↵mmoss@google.com2008-09-115-20/+63
| | | | | | | | before skipping it. Also update a couple instances and comments to reflect current behaviour (see also http://codereview.chromium.org/1681). Review URL: http://codereview.chromium.org/1709 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2060 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use the Windows high-resolution Time::Now hacks on Posix, the normal ↵deanm@chromium.org2008-09-114-66/+46
| | | | | | | | resultion from the time APIs there should be enough. Review URL: http://codereview.chromium.org/2420 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2056 0039d316-1c4b-4281-b951-d872f2087c98
* Add the shared memory test to the scons build.paulg@google.com2008-09-111-1/+1
| | | | | | Review URL: http://codereview.chromium.org/1928 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2050 0039d316-1c4b-4281-b951-d872f2087c98
* First pass of porting the shared memory unittest. We still needpaulg@google.com2008-09-112-85/+113
| | | | | | | | | to port the underlying SharedMemory machinery, like ShareToProcess, before we can add all the tests in this file to the Mac and linux builds. This change removes the Windows threading dependencies. Review URL: http://codereview.chromium.org/1922 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2046 0039d316-1c4b-4281-b951-d872f2087c98
* Accommodate removal of gfx\platform_canvas_unittest_win.cc in thesgk@google.com2008-09-102-2/+1
| | | | | | | | SCons build (linked by the parent SConscript file). bitmap_platform_device.cc => bitmap_platform_device_win.cc Review URL: http://codereview.chromium.org/1710 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2014 0039d316-1c4b-4281-b951-d872f2087c98
* Google Update gave us a new IDL and asked us to change the CLSID const we ↵finnur@google.com2008-09-101-1/+1
| | | | | | | | use. Effectively there should be no change here. This is not required for the beta branch. Review URL: http://codereview.chromium.org/1901 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2008 0039d316-1c4b-4281-b951-d872f2087c98
* The About box was needlessly blocking Chrome on Vista SP1 (with UAC ↵finnur@google.com2008-09-102-0/+21
| | | | | | | | disabled) from performing an On-demand update. Google Update has worked around the issue - for SP1 and up that is - so we can relax the restriction a bit. Review URL: http://codereview.chromium.org/1708 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2003 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a mis-merge in TLS changes.deanm@chromium.org2008-09-101-4/+1
| | | | | | Review URL: http://codereview.chromium.org/1699 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1983 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of code from the old to new TLS interface.deanm@chromium.org2008-09-104-31/+27
| | | | | | Review URL: http://codereview.chromium.org/1660 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1982 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the GCC build.darin@chromium.org2008-09-101-2/+2
| | | | | | | | TBR=mmentovai Review URL: http://codereview.chromium.org/1687 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1962 0039d316-1c4b-4281-b951-d872f2087c98
* disable tests that are not ready to be enabled yetdarin@chromium.org2008-09-101-0/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1961 0039d316-1c4b-4281-b951-d872f2087c98
* Put back r1891 with some task deletion disabled to maintain backwards compat ↵darin@chromium.org2008-09-103-38/+121
| | | | | | | | | | and thereby avoid unexpected crashes. r=jar Review URL: http://codereview.chromium.org/1664 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1959 0039d316-1c4b-4281-b951-d872f2087c98
* Use gcc 4.2 for the Mac build. Fix up new warnings and errors pointed outmark@chromium.org2008-09-104-14/+12
| | | | | | | | | | by gcc 4.2: warning: 'C' has a field 'C::m_' whose type uses the anonymous namespace warning: missing braces around initializer for 'S' error: extra qualification 'C::' on member 'm' Review URL: http://codereview.chromium.org/1675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1955 0039d316-1c4b-4281-b951-d872f2087c98
* Make CreateDirectory consistent on Win and Posix when directory exists.mmoss@google.com2008-09-092-3/+4
| | | | | | Review URL: http://codereview.chromium.org/1681 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1941 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build break, add TODO to clean up unit test referenceawalker@google.com2008-09-091-6/+8
| | | | | | | handling Review URL: http://codereview.chromium.org/1682 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1940 0039d316-1c4b-4281-b951-d872f2087c98
* Update file that got committed under the wrong name, causingawalker@google.com2008-09-091-30/+53
| | | | | | | the change to get missed. Review URL: http://codereview.chromium.org/1862 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1937 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the file extension.maruel@google.com2008-09-091-0/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1932 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the platform canvas unit test a bit so that it can be run onawalker@google.com2008-09-0910-17/+57
| | | | | | | | | | | | | multiple platforms. Also adjusts platfom_canvas.h and platform_device.h so that some upper layers can include them instead of the windows versions. Change was originally http://codereview.chromium.org/1616, which was created in the wrong source tree. Applying approval from that issue. Review URL: http://codereview.chromium.org/1853 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1926 0039d316-1c4b-4281-b951-d872f2087c98
* 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