summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Use histograms to send interesting parts of the disk cache statistics.rvargas@google.com2008-09-242-13/+14
| | | | | | | | | | | Most of this CL deals with a derived implementation of histograms that just queries the size stats already generated by the disk cache. The exact number of buckets, and their distribution, is controlled directly by the new class and the disk cache stats code. Review URL: http://codereview.chromium.org/3069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2580 0039d316-1c4b-4281-b951-d872f2087c98
* Run ObjectWatcher unit tests against all types of message loops.darin@google.com2008-09-241-10/+34
| | | | | | | | R=jar Review URL: http://codereview.chromium.org/4245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2570 0039d316-1c4b-4281-b951-d872f2087c98
* Get libevent building and linking in base_unittests in the Mac SCons build:sgk@google.com2008-09-241-2/+3
| | | | | | | | | | | | | | | | | | * Call the $LIBEVENT_DIR/SConscript file on both Linux and Mac. * Add generation of the config.h file. * Modify the libevent_prebuild.sh script so SCons can pass in the input file name (because SCons executes things from top of tree) but the script still defaults to what XCode wants. * Only build epoll.c and epoll_sub.c on Linux. * Only build kqueue.c on Mac. * Add -framework AppKit to the link lines. * Add -fobjc-gc to Objective C compilation. * Add message_pump_mac.mm to the base input file list on Mac. * Build message_pump_libevent.cc on for base on both Linux and Mac. * Link against -levent on both Linux and Mac. Review URL: http://codereview.chromium.org/4254 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2555 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds new UI tests for the SSL UI.jcampan@chromium.org2008-09-241-0/+8
| | | | | | | | | | | | | | | | | | | | Some more info: SSL UI Tests: Added new tests for redirects and frames. Also improved the mixed-content test to exercise the "block mixed-contents" preference and the show info-bar. Automation: For the new UI tests, added methods to tab_proxy and browser_proxy. The ones of most interest are GetLastNavigatinTime and WaitForNavigation that ensures we wait for a navigation to occur or have occured when taking actions that asynchronously trigger navigations. Resource loading: Added a flag to the response we get when loading a resource that indicates whether that resource was filtered (blocked or altered) by the security peer. We use this flag to notify back the browser when we report a load has been committed. This is so the SSL manager knows a frame has been filtered (in which case we have no cert info but should not consider that as unsafe). BUG=2004 Review URL: http://codereview.chromium.org/3165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2553 0039d316-1c4b-4281-b951-d872f2087c98
* When a bitmap allocation fails, do some checks that will crash in differentbrettw@google.com2008-09-241-1/+30
| | | | | | | | | | ways so we can get a better picture when looking at the crash reports of why the allocation might be failing. BUG=1275638 Review URL: http://codereview.chromium.org/3119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2548 0039d316-1c4b-4281-b951-d872f2087c98
* Enforce Terminate on Heap Corruption in most of our executable on Windows XP ↵maruel@google.com2008-09-244-1/+15
| | | | | | | | | | | SP3 or Vista. This won't submit the crash dump but it's still better than nothing. Fix broken alignment on test_shell_main.cc. Review URL: http://codereview.chromium.org/3105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2546 0039d316-1c4b-4281-b951-d872f2087c98
* Create a class for getting at processor information via thembelshe@google.com2008-09-244-0/+103
| | | | | | | | | | | | CPUID instruction. These will get used and integrated into the build in a future changelist. I debated on the naming of these. They are x86 processor specific. Suggestions on naming is welcome. Review URL: http://codereview.chromium.org/3199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2542 0039d316-1c4b-4281-b951-d872f2087c98
* port some parts of webkit/glue/plugins/test to Linuxevanm@google.com2008-09-243-0/+13
| | | | | | | | | | | these are not all parts (about a half), but still something BUG=1949 Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2534 0039d316-1c4b-4281-b951-d872f2087c98
* Miscellaneous cleanup.wtc@google.com2008-09-231-1/+0
| | | | | | | | | | | | | | | | Removed an extraneous 'protected' in message_loop.h. Don't need to document Read and Write again in tcp_client_socket.h. They are documented in socket.h. Map more POSIX error codes. Check for EAGAIN as well as EWOULDBLOCK. Cleaned up error handling in DidCompleteConnect. R=dank Review URL: http://codereview.chromium.org/4234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2532 0039d316-1c4b-4281-b951-d872f2087c98
* Mac-specific CFRunLoop-based MessagePump implementationmark@chromium.org2008-09-234-4/+566
| | | | | | Review URL: http://codereview.chromium.org/444 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2521 0039d316-1c4b-4281-b951-d872f2087c98
* SkRect.fTop should be set to the y coordinate of a CGRect, not the xamanda@chromium.org2008-09-231-2/+2
| | | | | | | | Patch contributed by James Vega <vega.james@gmail.com>. Original review: http://codereview.chromium.org/3198 Review URL: http://codereview.chromium.org/4230 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2513 0039d316-1c4b-4281-b951-d872f2087c98
* fix oopsdarin@chromium.org2008-09-231-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2510 0039d316-1c4b-4281-b951-d872f2087c98
* Always use the topmost delayed task as the basis for our WM_TIMER.darin@chromium.org2008-09-232-2/+114
| | | | | | | | | R=jar BUG=2559 Review URL: http://codereview.chromium.org/4041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2509 0039d316-1c4b-4281-b951-d872f2087c98
* ensure that the shared memory has actually been created before trying to ↵pinkerton@google.com2008-09-231-1/+1
| | | | | | | | re-use it when the |open_existing| flag is passed to Create(). Review URL: http://codereview.chromium.org/4039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2488 0039d316-1c4b-4281-b951-d872f2087c98
* Roll the icu38 revision in the DEPS file to change the name ofsgk@google.com2008-09-231-1/+1
| | | | | | | | | our combined-build icuuc.lib to icu.lib. Change solution file references accordingly. Also change libxml patch and Makefile references Review URL: http://codereview.chromium.org/4027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2480 0039d316-1c4b-4281-b951-d872f2087c98
* My base changes to the plugin code.jam@chromium.org2008-09-221-4/+24
| | | | | | Review URL: http://codereview.chromium.org/3197 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2460 0039d316-1c4b-4281-b951-d872f2087c98
* Fix AmountOfFreeDiskSpace to be able to differentiate an errorrvargas@google.com2008-09-203-5/+12
| | | | | | | | from a full disk. Review URL: http://codereview.chromium.org/4003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2431 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash that can occur if PumpOutPendingPaintMessages is called outside ↵darin@chromium.org2008-09-191-0/+5
| | | | | | | | | | the context of MessagePump::Run. R=jar Review URL: http://codereview.chromium.org/3137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2415 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug in file_util::ReplaceExtension that could chop off pathsky@google.com2008-09-192-5/+39
| | | | | | | | | | | elements. This was causing some folks bookmarks not to get saved! BUG=1946 TEST=covered by unit tests Review URL: http://codereview.chromium.org/2990 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2412 0039d316-1c4b-4281-b951-d872f2087c98