summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Disallow recursive locking via the Lock classjar@google.com2008-10-092-113/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Change contract so that Posix locks (which deadlock on attempts by a single thread to acquire a mutex recursively) and windows critical sections can both be used to implement the Lock() cass, by disallowing recursive locking. In DEBUG mode only, we watch for (now) illegal use of recursive locking. Also remove a pile of cruft that has built up in this file as various folks have re-re-refactored and moved around code. Note that Window's condition variable implementation still uses the AutoUnlock() helper class, but now the implementation (sans nested locking) is very trivial. Posix will probably use their own CV implementation. r=mbelshe Review URL: http://codereview.chromium.org/5630 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3105 0039d316-1c4b-4281-b951-d872f2087c98
* remove unneeded webkit_glue:: and wrap windows functions in ifdefserg@google.com2008-10-081-1/+3
| | | | | | | | Review URL: http://codereview.chromium.org/6413 Patch from icefox. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3065 0039d316-1c4b-4281-b951-d872f2087c98
* Change the font search order to try Lucida Sans Unicode before Arial Unicode ↵jungshik@google.com2008-10-081-1/+1
| | | | | | | | | | | | | | | | | | MS because the former is available on Windows XP or later while the latter is only available with MS Office installed. This is partly to make font-dependent layout test results 'invariant' with or without Arial Unicode MS installed. Eventually, we may want to make those tests more robust against the font availability by removing some Unicode characters not commonly available. BUG=2304 TEST=pass the layout tests affected Review URL: http://codereview.chromium.org/6495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3062 0039d316-1c4b-4281-b951-d872f2087c98
* Make Mac clipboard code tolerant of nil clipboard without crashing. Add amark@chromium.org2008-10-081-30/+36
| | | | | | | DCHECK to catch this case, and clean up some of the clipboard code. Review URL: http://codereview.chromium.org/6580 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3051 0039d316-1c4b-4281-b951-d872f2087c98
* Provide converters to and from NSString* in sys_string_conversionsmark@chromium.org2008-10-085-8/+77
| | | | | | Review URL: http://codereview.chromium.org/6355 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3050 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a typo I noticed when looking at object tracking. The wrong argument wasbrettw@google.com2008-10-081-1/+1
| | | | | | | given to the printf. Review URL: http://codereview.chromium.org/6356 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3041 0039d316-1c4b-4281-b951-d872f2087c98
* Klocwork bug. Checking the wrong variable.cpu@google.com2008-10-081-7/+12
| | | | | | | | BUG = 3103 Review URL: http://codereview.chromium.org/6453 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3030 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some problems with machine level install.kuchhal@chromium.org2008-10-082-0/+11
| | | | | | | | BUG=2380 Review URL: http://codereview.chromium.org/6402 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3015 0039d316-1c4b-4281-b951-d872f2087c98
* Add Mac BeingDebugged implementationmark@chromium.org2008-10-081-7/+33
| | | | | | Review URL: http://codereview.chromium.org/6582 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3009 0039d316-1c4b-4281-b951-d872f2087c98
* backing out debugging changes now that we know the problem.pinkerton@google.com2008-10-081-5/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3006 0039d316-1c4b-4281-b951-d872f2087c98
* checking debug output for failing test on buildbot. to be backed out in a ↵pinkerton@google.com2008-10-081-0/+5
| | | | | | minute. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3005 0039d316-1c4b-4281-b951-d872f2087c98
* Add -- as a command line switch parsing terminator. This allows you to ↵deanm@chromium.org2008-10-063-8/+41
| | | | | | | | launch chrome to a given URL safely, without having to validate the URL and worry it might be interpreted as a dangerous command line argument. Review URL: http://codereview.chromium.org/6480 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2876 0039d316-1c4b-4281-b951-d872f2087c98
* Make ClipboardTest a PlatformTest to get autorelease pool management, neededmark@chromium.org2008-10-031-15/+13
| | | | | | | on the Mac Review URL: http://codereview.chromium.org/6455 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2845 0039d316-1c4b-4281-b951-d872f2087c98
* Use the full src-relative path to gtest.hmark@chromium.org2008-10-031-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2841 0039d316-1c4b-4281-b951-d872f2087c98
* Add a FilePath objectmark@chromium.org2008-10-037-5/+725
| | | | | | Review URL: http://codereview.chromium.org/6025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2838 0039d316-1c4b-4281-b951-d872f2087c98
* Implement MessageLoopForUI using GLib. This gets some exercise fromdsh@google.com2008-10-034-7/+413
| | | | | | | | | | base_unittest. BUG=1319 Review URL: http://codereview.chromium.org/4261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2834 0039d316-1c4b-4281-b951-d872f2087c98
* Bring up clipboard_unittest.cc on the Mac.jeremy@chromium.org2008-10-025-74/+252
| | | | | | Review URL: http://codereview.chromium.org/6424 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2815 0039d316-1c4b-4281-b951-d872f2087c98
* Don't throw the thread name setting exception unless a debugger is attached.deanm@chromium.org2008-10-021-0/+5
| | | | | | Review URL: http://codereview.chromium.org/5671 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2792 0039d316-1c4b-4281-b951-d872f2087c98
* Add platform_canvas_unittest.ccjeremy@chromium.org2008-10-016-39/+58
| | | | | | | Also fixes issue 2977. Review URL: http://codereview.chromium.org/5644 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2777 0039d316-1c4b-4281-b951-d872f2087c98
* Cross-platform wrappers for fopen, _wfopen_s, etc.mark@chromium.org2008-10-019-61/+69
| | | | | | | | | Patch by Paweł Hajdan jr <phajdan.jr@gmail.com>. http://codereview.chromium.org/6005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2760 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where JSON reader errored on reading vertical tabs (\v). Thesky@google.com2008-10-013-2/+7
| | | | | | | | | | | | writer properly escapes a vertical tab, but the readed instead errored on the vertical this. This resulted in lost bookmarks:( BUG=3031 TEST=covered by unit tests Review URL: http://codereview.chromium.org/5628 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2759 0039d316-1c4b-4281-b951-d872f2087c98
* Enable error checking on Posix locks in debug, and make release lock ↵deanm@chromium.org2008-10-011-1/+7
| | | | | | | | creation do a little bit less work. Based on suggestions by Gaetano Mendola. Review URL: http://codereview.chromium.org/6038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2755 0039d316-1c4b-4281-b951-d872f2087c98
* Some small cleanups to Lock suggested by Gaetano Mendola.deanm@chromium.org2008-10-012-3/+3
| | | | | | Review URL: http://codereview.chromium.org/6037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2754 0039d316-1c4b-4281-b951-d872f2087c98
* Fix painting problem with transparent plugins because plugins were ignoring ↵jam@chromium.org2008-10-011-0/+8
| | | | | | | | | | | | | | | the alpha channel sometimes. This change introduces another buffer which holds the background image for transparent plugins. Before painting these plugins, their backing store is overwritten with the background data. This change also uses an ACK from the renderer to figure out when it can paint, similar to how the renderer does it, which gives us throttling and also doesn't lead to painting when the tab is hidden. Review URL: http://codereview.chromium.org/5040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2744 0039d316-1c4b-4281-b951-d872f2087c98
* This fixes http://code.google.com/p/chromium/issues/detail?id=772,iyengar@google.com2008-10-011-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | which was an issue with the browser UI thread entering a tight loop at times. The thread inputs of the browser UI thread and the plugin thread are attached due to the parent child relationship between the windows. As a result at times the MsgWaitForMultipleObjectsEx API returns the fact that there are messages in the queue (mouse messages). The subsequent peek fails to return any messages causing us to enter a loop for a while. This also happens when the plugin has capture and just before it releases capture, some mousemoves end up in the browser ui thread causing a tight loop. The fix is to check if there are mouse messages in the queue by invoking GetQueueStatus and attempting to peek them out with PM_NOREMOVE. If this fails we call WaitMessage to block until the next message. The other fix is to return true from ProcessNextWindowsMessage if PeekMessage returns false and there were sent messages in the queue, as this is as expected. This will ensure that we go back up and peek again instead of calling MsgWaitForMultipleObjectsEx again. Bug=772 R=darin Review URL: http://codereview.chromium.org/6021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2740 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some issues found looking at the code.maruel@google.com2008-09-3011-61/+51
| | | | | | | | | | Patch from Gaetano Mendola <mendola@gmail.com> Original review: http://codereview.chromium.org/4273 I added some additions on my part and two unit test fix due to the added DCHECK. Reduced atl header inclusion. Review URL: http://codereview.chromium.org/5009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2730 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce RandDouble to one call to ldexp, add one bit of precisionmark@chromium.org2008-09-302-18/+18
| | | | | | Review URL: http://codereview.chromium.org/5801 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2712 0039d316-1c4b-4281-b951-d872f2087c98
* Sync Mac canvas implementation with Windows version, still a work in progress,jeremy@chromium.org2008-09-296-138/+102
| | | | | | | | not all unit tests pass yet. Review URL: http://codereview.chromium.org/4339 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2702 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring for portability:mark@chromium.org2008-09-2913-0/+333
| | | | | | | | | | | | | - Move chrome/common/env_util to base/sys_info - Move chrome/common/rand_util to base/rand_util (new), simplify its public interface, and fix its implementation Patch by Paweł Hajdan, Jr. <phajdan.jr@gmail.com> http://codereview.chromium.org/4079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2697 0039d316-1c4b-4281-b951-d872f2087c98
* Silence this unit test on Windows 2003 until bug 2732 is fixed.maruel@google.com2008-09-291-0/+4
| | | | | | Review URL: http://codereview.chromium.org/4335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2687 0039d316-1c4b-4281-b951-d872f2087c98
* Display the tmp path to help debug an issue with a build bot.maruel@google.com2008-09-291-1/+1
| | | | | | Review URL: http://codereview.chromium.org/4336 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2686 0039d316-1c4b-4281-b951-d872f2087c98
* ICU changessgk@google.com2008-09-291-7/+32
| | | | | | | | | | | | | * Add an ICU_UTIL_DATA_IMPL #defines to control whether we're expecting the ICU data as ICU_UTIL_DATA_{SHARED,STATIC,FILE}. * Set defaults on the platforms to match our current practice: Windows => shared, Linux => file, Mac => static. * On Mac, link the separate icui18n, icuuc and icudata libs (matching how we're building there), instead of the common icu lib. * Roll the icu38 revision in DEPS to get the updated SCons build. Review URL: http://codereview.chromium.org/5022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2669 0039d316-1c4b-4281-b951-d872f2087c98
* Check for cpu items before assuming it will work.mbelshe@google.com2008-09-261-8/+10
| | | | | | Review URL: http://codereview.chromium.org/3804 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2653 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the mac compile by removing the unnecessary setDeviceOffset function.brettw@google.com2008-09-263-13/+0
| | | | | | Review URL: http://codereview.chromium.org/5020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2652 0039d316-1c4b-4281-b951-d872f2087c98
* Roll the third_party/icu38 revision in DEPS to have SCons build libicu,sgk@google.com2008-09-261-1/+1
| | | | | | | | | | not libicuuc. Add a new $ICU_LIBS construction variable to allow different platforms to link with different sets of ICU libraries. Use it in the LIBS lists of the various construction environments used to build the things that link with it. Review URL: http://codereview.chromium.org/4312 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2651 0039d316-1c4b-4281-b951-d872f2087c98
* Add scoped_nsautorelease_pool.mm to the Mac SCons Build.sgk@google.com2008-09-261-0/+1
| | | | | | Review URL: http://codereview.chromium.org/5015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2647 0039d316-1c4b-4281-b951-d872f2087c98
* Remove setDeviceOffset which isn't used. Fixed a few style and line wrapping ↵brettw@google.com2008-09-267-79/+32
| | | | | | | | issues. Review URL: http://codereview.chromium.org/5012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2644 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some header guards that are named incorrectly.darin@chromium.org2008-09-263-11/+9
| | | | | | | | R=tony Review URL: http://codereview.chromium.org/4306 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2639 0039d316-1c4b-4281-b951-d872f2087c98
* Increase min throttle on the new timer performance test.mbelshe@google.com2008-09-261-1/+4
| | | | | | | | | | | | This is an arbitrary timer, but these tests run slower than I expected on the bbots. TBR=ojan Review URL: http://codereview.chromium.org/4301 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2629 0039d316-1c4b-4281-b951-d872f2087c98
* Change to Hi Res timers on Windows.mbelshe@google.com2008-09-266-51/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two parts of this: 1) TimeTicks:Now() Don't call timeBeginPeriod() in all cases. Use the new SystemMonitor class to watch battery on/off transitions and use the timeBeginPeriod() only when we're using the battery. 2) TimeTicks::UnreliableHiResNow() Change this function from "UnreliableHiResNow()" to "HiResNow()". We still use QPC, but we detect if we're on AMD Athlon XP machines which fail on QPC. For those systems, we fall back to TimeTicks::Now(). Updated tests to detect hardware specifics of timers. Output of the test will contain lines such as these: [ RUN ] TimeTicks.SubMillisecondTimers Min timer is: 1us [ OK ] TimeTicks.SubMillisecondTimers [ RUN ] TimeTicks.TimeGetTimeCaps timeGetTime range is 1 to 1000000ms [ OK ] TimeTicks.TimeGetTimeCaps [ RUN ] TimeTicks.QueryPerformanceFrequency QueryPerformanceFrequency is 2394.18MHz [ OK ] TimeTicks.QueryPerformanceFrequency [ RUN ] TimeTicks.TimerPerformance Time::Now: 0.11us per call TimeTicks::Now: 0.09us per call TimeTicks::HighResNow: 0.26us per call [ OK ] TimeTicks.TimerPerformance Review URL: http://codereview.chromium.org/4092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2625 0039d316-1c4b-4281-b951-d872f2087c98
* Add file_util::GetFileInfo as a means to provide more information about a filedarin@google.com2008-09-264-12/+35
| | | | | | | | | | | path. This CL changes GetFileSize to be implemented in terms of GetFileInfo since under the hood on all platforms the same system call is used. R=mark Review URL: http://codereview.chromium.org/4286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2624 0039d316-1c4b-4281-b951-d872f2087c98
* Wow, it's been a while since we cleaned EOL.maruel@google.com2008-09-259-1318/+1318
| | | | | | | | | | | | Ran dos2unix on *.cc, *.h, *.py and SCons*.* Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\*.cc Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\*.h Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\*.py Ran for /R /D %a in (*.*) do @if exist %a\.svn\. svn pset svn:eol-style LF %a\SCons*.* git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2611 0039d316-1c4b-4281-b951-d872f2087c98
* Add UTF-8 check for JSON deserializer.jungshik@google.com2008-09-255-10/+86
| | | | | | | | | | | Add tests for IsStringUTF8 Make IsStringUTF8 accept std::string/std::wstring rather than char*/wchar_t* Review URL: http://codereview.chromium.org/4268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2610 0039d316-1c4b-4281-b951-d872f2087c98
* Stop spamming delayed tasks on each input event.darin@chromium.org2008-09-251-0/+7
| | | | | | | | | R=mbelshe BUG=2693 Review URL: http://codereview.chromium.org/4262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2609 0039d316-1c4b-4281-b951-d872f2087c98
* Fix non-Mac break from r2603mark@chromium.org2008-09-251-1/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2604 0039d316-1c4b-4281-b951-d872f2087c98
* Provide autorelease pool management on the Mac in all types of message pumps.mark@chromium.org2008-09-259-10/+99
| | | | | | | Fix a few unit tests to use autorelease pools as needed. Review URL: http://codereview.chromium.org/3805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2603 0039d316-1c4b-4281-b951-d872f2087c98
* As an intermediate step towards having a message pump handling IO through ↵rvargas@google.com2008-09-254-146/+267
| | | | | | | | | | completion ports, this CL creates two types of message pumps for windows: one to handle UI threads and another one to handle IO threads. I'm basically moving stuff around, except by the fact that now UI threads will not process APCs or wait on objects (those things only happen on message loops of TYPE_IO) Review URL: http://codereview.chromium.org/3094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2602 0039d316-1c4b-4281-b951-d872f2087c98
* Adding system_monitor to buildpinkerton@google.com2008-09-251-0/+8
| | | | | | Review URL: http://codereview.chromium.org/4085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2600 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linux build by adding a new line at the end of this nsylvain@chromium.org2008-09-251-1/+1
| | | | | | | file. Review URL: http://codereview.chromium.org/4091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2596 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a SystemMonitor class for monitoring system statusmbelshe@google.com2008-09-257-0/+276
| | | | | | | | | | | | changes. For now, this is just implementing power changes (e.g. battery/AC power changes). This CL just contains this class; the hooking into Chrome will come in a separate CL, but I've tested the basics already. Review URL: http://codereview.chromium.org/4051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2593 0039d316-1c4b-4281-b951-d872f2087c98