summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Revert change 430 because it breaks the build.nsylvain@google.com2008-08-062-168/+27
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@437 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring file_util into file_util and file_util_win. Also fix windows ↵erikkay@google.com2008-08-067-597/+684
| | | | | | | | dependencies in path_service.cc. One questionable decision here was to put GetCurrentDirectory and SetCurrentDirectory into file_util_win.cc. I could have kept the logic in path_service.cc with #ifdefs or I could have split up path_service.cc into path_service_win.cc, etc. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@436 0039d316-1c4b-4281-b951-d872f2087c98
* Mac changes to the path service.avi@google.com2008-08-062-19/+45
| | | | | | Review URL: http://chrome-reviews.prom.corp.google.com/1107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@435 0039d316-1c4b-4281-b951-d872f2087c98
* Portability fix for Value. The MSVC CRT doesn't complain about memcpy_s ↵mmentovai@google.com2008-08-062-2/+3
| | | | | | unless _CRT_SECURE_DEPRECATE_MEMORY is defined (and it isn't); there are no other callers of memcpy_s in base. (And seriously, what's an extra count argument supposed to solve, anyway?) current_entry_type is dropped because it's unused. A virtual destructor is added to ValueSerializer to conform to the style guide and quiet gcc's helpful warning. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@434 0039d316-1c4b-4281-b951-d872f2087c98
* Portability fix for JSONWriter. gcc warns when the declaration order ↵mmentovai@google.com2008-08-062-6/+7
| | | | | | doesn't match the initialization order. Tossed in a couple of changes for better style guide conformance for good measure. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@433 0039d316-1c4b-4281-b951-d872f2087c98
* Fix incorrect OS_APPLE to OS_MACOSX and drop COMPILER_GCC since the codedeanm@google.com2008-08-061-1/+1
| | | | | | | | uses the Apple APIs for atomic operations and not inline assembly. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@432 0039d316-1c4b-4281-b951-d872f2087c98
* Use our own hash function that supports embedded NULLs for both char and ↵pinkerton@google.com2008-08-061-15/+11
| | | | | | wchar strings git-svn-id: svn://svn.chromium.org/chrome/trunk/src@431 0039d316-1c4b-4281-b951-d872f2087c98
* Changes for POSIX support. Yay for ifdefs!pinkerton@google.com2008-08-062-27/+168
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@430 0039d316-1c4b-4281-b951-d872f2087c98
* Compiler changes to work with GCCpinkerton@google.com2008-08-062-7/+16
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@428 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/timer from deprecated atomic interface to AtomicSequenceNumber.deanm@google.com2008-08-062-8/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@427 0039d316-1c4b-4281-b951-d872f2087c98
* Move ref_counted to the new atomic_ref_count interface.deanm@google.com2008-08-061-8/+5
| | | | | | | | BUG=1112286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@425 0039d316-1c4b-4281-b951-d872f2087c98
* Cross platform and cleanup of Singleton classdeanm@google.com2008-08-064-198/+52
| | | | | | | | | - Move away from windows-specific atomic operations to cross platform atopmicops - Remove double new semantics on windows git-svn-id: svn://svn.chromium.org/chrome/trunk/src@424 0039d316-1c4b-4281-b951-d872f2087c98
* Add YieldCurrentThread to PlatformThread, for giving up the current thread's ↵deanm@google.com2008-08-062-0/+16
| | | | | | timeslice. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@423 0039d316-1c4b-4281-b951-d872f2087c98
* Bring in more files from the mac july branch.paulg@google.com2008-08-062-12/+19
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@412 0039d316-1c4b-4281-b951-d872f2087c98
* ObjectWatcher needs to know when the current thread's MessageLoop is being ↵darin@google.com2008-08-055-6/+94
| | | | | | destroyed. This might also be generically useful, so I added a new API on ML to observe when the ML is being destroyed. The notification is sent to observers just prior to ML::current() being modified to return NULL. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@407 0039d316-1c4b-4281-b951-d872f2087c98
* Allow string-to-int conversions to provide a return value indicating ↵mmentovai@google.com2008-08-055-17/+421
| | | | | | success. Implement them consistently on all platforms. Fill in a couple of necessary missing pieces. Eliminate the need for many uses of sscanf. Add tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@405 0039d316-1c4b-4281-b951-d872f2087c98
* Add base_paths_win.cc to SCons build.sgk@google.com2008-08-051-4/+9
| | | | | | | Use the occasion to collect the other *_win.cc source files in a Windows-specific block. TBR: erikkay git-svn-id: svn://svn.chromium.org/chrome/trunk/src@400 0039d316-1c4b-4281-b951-d872f2087c98
* Bring over the changes from the Mac branch.paulg@google.com2008-08-052-0/+23
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@392 0039d316-1c4b-4281-b951-d872f2087c98
* refactor base_paths so that windows-specific paths are pulled out into their ↵erikkay@google.com2008-08-056-102/+232
| | | | | | own file. Note that some of the same path key names will exist in other platform-specific files. For example, base_paths_mac.mm will have FILE_EXE and DIR_APP_DATA (among others). git-svn-id: svn://svn.chromium.org/chrome/trunk/src@389 0039d316-1c4b-4281-b951-d872f2087c98
* Fix an issue where U_WCHAR_IS_UTF16 would not be defined systematically. ↵maruel@google.com2008-08-051-3/+1
| | | | | | This would result in WordIterator definition not being consistent and random crashes would occur. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@387 0039d316-1c4b-4281-b951-d872f2087c98
* Revert base\gfx changes because it breaks the buildnsylvain@google.com2008-08-057-112/+7
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@386 0039d316-1c4b-4281-b951-d872f2087c98
* Unix line-endings.evanm@google.com2008-08-052-283/+283
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@384 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for missing build info.avi@google.com2008-08-052-0/+4
| | | | | | Review URL: http://chrome-reviews.prom.corp.google.com/1128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@383 0039d316-1c4b-4281-b951-d872f2087c98
* Fix basic geometric types.avi@google.com2008-08-057-7/+108
| | | | | | Review URL: http://chrome-reviews.prom.corp.google.com/1106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@381 0039d316-1c4b-4281-b951-d872f2087c98
* Reworking unit test target to start all over, with gtest static library and ↵pinkerton@google.com2008-08-051-212/+144
| | | | | | pulling in only files we know compile. Define UNIT_TEST as some tests rely on that. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@375 0039d316-1c4b-4281-b951-d872f2087c98
* Import base::LINKER_INITIALIZED from google-perftools / tcmalloc. This is ↵deanm@google.com2008-08-051-0/+17
| | | | | | effectively just an annotation; a class can describe that it's ok to be used as a global static object because it will be zero initialized, so construction order doesn't matter. This also makes it clear from someone using it as a global object that it's safe. This will be used for spinlocks. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@374 0039d316-1c4b-4281-b951-d872f2087c98
* UTF16 vs 32 issues.avi@google.com2008-08-052-0/+23
| | | | | | Review URL: http://chrome-reviews.prom.corp.google.com/1091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@373 0039d316-1c4b-4281-b951-d872f2087c98
* Use the build_config defines in atomicops.h. This still uses the ↵deanm@google.com2008-08-051-13/+10
| | | | | | compiler/platform specific defines in the platform dependent internals headers, keeping them closer to the original implementation. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@372 0039d316-1c4b-4281-b951-d872f2087c98
* New atomic operation foundation code and interfaces. Based on the atomic ↵deanm@google.com2008-08-057-0/+1206
| | | | | | | | | | | operations in google-perftools / tcmalloc. - Makes atomic operations cross-platform (win/mac/linux). - Supports 64 bit operations on 64 bit processors. - Make atomic operations more correct on Windows (barriers). - Introduces a better / safer interface, and abstracts away most common atomic operations, reference counting and sequence numbers. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@370 0039d316-1c4b-4281-b951-d872f2087c98
* (Mac port.) Work around Mac gcc getting confused by an integer.evanm@google.com2008-08-051-1/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@358 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the base build of single_unittests.exe, which was trying to link in the ↵sgk@google.com2008-08-041-1/+2
| | | | | | | | .dll as a .lib. TBR: bradnelson git-svn-id: svn://svn.chromium.org/chrome/trunk/src@349 0039d316-1c4b-4281-b951-d872f2087c98
* Provide OS_ and COMPILER_ macros for OS and compiler differentiationmmentovai@google.com2008-08-041-1/+3
| | | | | | Review URL: http://chrome-reviews.prom.corp.google.com/1108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@338 0039d316-1c4b-4281-b951-d872f2087c98
* Checking in the rest of the .lib changes, previous commit was only done from ↵sgk@google.com2008-08-041-35/+43
| | | | | | | | | chrome/ and only got those SConscript files. R=evanm,bradnelson git-svn-id: svn://svn.chromium.org/chrome/trunk/src@331 0039d316-1c4b-4281-b951-d872f2087c98
* Adding specializations of hash() for various string types. GCC requires you ↵pinkerton@google.com2008-08-041-5/+66
| | | | | | | | bring your own hash function for maps and sets. Review URL: http://chrome-reviews.prom.corp.google.com/1085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@327 0039d316-1c4b-4281-b951-d872f2087c98
* fix builddarin@google.com2008-08-041-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@324 0039d316-1c4b-4281-b951-d872f2087c98
* Revise the ObjectWatcher API to be one-to-one with the object being watched. ↵darin@google.com2008-08-045-157/+126
| | | | | | | | | | | | This greatly simplifies the implementation and API. Now consumers can use ObjectWatcher as a "smart pointer" class, which automatically cleans-up after itself when it goes out of scope. I also switched away from the Task based API to one that is more compatible with MessageLoop::WatchObject. That allows me to make minimal changes to existing code, and it also means that consumers do not have to allocate Task objects to use this API. In this CL, I included changes to make a couple consumers use ObjectWatcher instead of ML::WatchObject. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@322 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gcc/msvc differencespinkerton@google.com2008-08-041-2/+3
| | | | | | Review URL: http://chrome-reviews.prom.corp.google.com/1104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@321 0039d316-1c4b-4281-b951-d872f2087c98
* Fix missing comma new string_piece.cc file.sgk@google.com2008-08-041-1/+1
| | | | | | TBR: deanm git-svn-id: svn://svn.chromium.org/chrome/trunk/src@316 0039d316-1c4b-4281-b951-d872f2087c98
* Remove incorrect scoping on method declarations.deanm@google.com2008-08-041-4/+4
| | | | | | TBR=evanm git-svn-id: svn://svn.chromium.org/chrome/trunk/src@314 0039d316-1c4b-4281-b951-d872f2087c98
* Add StringPiece to the scons build.deanm@google.com2008-08-041-0/+2
| | | | | | TBR=sgk git-svn-id: svn://svn.chromium.org/chrome/trunk/src@313 0039d316-1c4b-4281-b951-d872f2087c98
* Pull the block of common Windows system libraries that we link with ↵sgk@google.com2008-08-041-21/+0
| | | | | | | | everywhere into the base Windows environment. TBR: evanm,bradnelson git-svn-id: svn://svn.chromium.org/chrome/trunk/src@310 0039d316-1c4b-4281-b951-d872f2087c98
* Convert submodules SConscript files to psuedo-builder calls.sgk@google.com2008-08-032-5/+5
| | | | | | | | TBR: evanm,bradnelson git-svn-id: svn://svn.chromium.org/chrome/trunk/src@304 0039d316-1c4b-4281-b951-d872f2087c98
* Rollback message loop testjar@google.com2008-08-033-21/+18
| | | | | | TBR git-svn-id: svn://svn.chromium.org/chrome/trunk/src@299 0039d316-1c4b-4281-b951-d872f2087c98
* This is a test, and will rollback asap after a build/test cycle starts.jar@google.com2008-08-033-18/+21
| | | | | | | | | | I use a counter of MessageLoop::Quit() calls so that I can re-post "extra" calls when MessageLoop::Run() terminates. This assures that no quits are lost... but I'm not sure if some code abused the Quit() calls, and already posts many-too-many quits :-/. I want to see if the tree tests go red, and how the distributed reliability test responds. The test should already pass the basic unit_test and base_unittest, but I'm not sure what the rest of the UI tests etc will do. If I'm lucky, they'll be "less" flakey. ...but they may just go red all over :-( TBR git-svn-id: svn://svn.chromium.org/chrome/trunk/src@298 0039d316-1c4b-4281-b951-d872f2087c98
* Call ResetBirthTime before dispatching the user's Task. Also, remove ↵darin@google.com2008-08-023-13/+1
| | | | | | | | PostSignaledTask since it won't be used. TBR=jar git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289 0039d316-1c4b-4281-b951-d872f2087c98
* I think this is the crashercpu@google.com2008-08-021-1/+2
| | | | | | | | | - I want to test this on the bots. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271 0039d316-1c4b-4281-b951-d872f2087c98
* Include trivial definition of method in release mode (where we don't do ↵jar@google.com2008-08-011-0/+1
| | | | | | | | | | | | | tracking) Repair tree bustage TBR=darin M base/tracked.cc git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266 0039d316-1c4b-4281-b951-d872f2087c98
* A new (private) interface is supplied that allows the object watcher (coding injar@google.com2008-08-014-3/+35
| | | | | | | | | | | | | | | | | | | | | proress by Darin) to Post the task (when the object is signaled) into a message loop. I also cleaned up the time-of-birth for tasks that sleep for a while before running (such as those held by the timer, or by passed to this new PostSignaledTask() interface. r=darin M base/tracked.cc M base/message_loop.h M base/message_loop.cc M base/tracked.h git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262 0039d316-1c4b-4281-b951-d872f2087c98
* SCons build:sgk@google.com2008-08-011-0/+2
| | | | | | | | | | | | * Add base\object{,_watcher}.cc. * Add chrome\browser\bookmark_{codec,storage}.cc. * Add chrome\views\frame\browser_window_factory.cc. * Split of app\main.cc into app\chrome_{dll,exe}_main.cc, with added CPPDEFINES for {BROWSER,RENDERER,PLUGIN}_DLL. * Move $CSCRIPT, $PLATFORMSDK* and $VISUAL_STUDIO variables to the win32-specific construction environment. * Remove unnecessary comments. TBR: bradnelson git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261 0039d316-1c4b-4281-b951-d872f2087c98
* A helper class for calling RegisterWaitForSingleObject with the objective of ↵darin@google.com2008-08-015-0/+411
| | | | | | | | | | | | | | | | | | | | finding out when objects get signaled. The API is pretty simple: - consumer can associate a Task with a HANDLE via AddWatch method - when the HANDLE is signaled, we run the Task on the thread that called AddWatch - the consumer can call CancelWatch to abort the watch - a watch is one-shot: after the object is signaled, the consumer has to call AddWatch again to wait a second time - if the ObjectWatcher instance is destroyed, it cancels all associated watches. Implementation details: - Uses RegisterWaitForSingleObject to run a function on the wait thread. This avoids extra thread marshaling to a worker thread. - Uses a Task to get back onto the origin thread. This is possible due to the UnregisterWaitEx(INVALID_HANDLE_VALUE) call. - Once on the origin thread, runs the consumer's Task directly. This is the first part of changes I want to make to MessageLoop::WatchObject. For now, I have not made any changes to existing code. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259 0039d316-1c4b-4281-b951-d872f2087c98